Sum every nth rows in Excel

2020-03-31 05:31发布

问题:

28      10 | 100
29      210
30    
40      20 | 84
41      130
42    
43      30 | 75
44      740
45    
46      40 | 73
47      220

How can I sum every 3 rows A29+A41+A44+A47+... I tried various suggestions like this and this one but couldn't figured it out.

In addition, is there any way to extract the second part, to a different column, of the other rows? I mean 100, 84, 75, 73, ...

回答1:

In a cell as a standard non-array formula,

=SUM(INDEX(A29:A48*NOT(MOD(ROW($29:$48)-29, 3)), , ))

The ROW($29:$48)-29 is the position within A29:A38 and must be expanded if A29:A48 is expanded.