Sum Every Nth Row

AlbertS

New Member
Joined
Mar 12, 2012
Messages
19
I have googled this and found the technical answer. My problem is modifying the canned text answe r(it seems to be exactly the same on each reply I've found).

I have D10:D249. I need to sum D10, D13, D16, D19 (every 3rd row) in cell D250.

HELP is always appreciated. If you can break down the answer in baby talk, so I can understand why it works, all the better!

Thanks in advance.
 
Thanks for all the tips & tricks,

I encountered an error in a formula you've posted. when I'm trying to sum the below mentioned range for summing up every 3rd row with this formula =SUMPRODUCT($A$1:$A$6*(MOD(ROW($A$1:$A$6),3)=1)) it is giving result 5 whereas it should hv been 3 + 6 = 9. But after making slight variation in your formula i.e. =SUMPRODUCT($A$1:$A$6*(MOD(ROW($A$1:$A$6),3)=0)) then it works absolutely fine. Why it is so?

[TABLE="width: 64"]
<colgroup><col width="64" style="width:48pt"> </colgroup><tbody>[TR]
[TD="width: 64, align: right"]1[/TD]
[/TR]
[TR]
[TD="align: right"]2[/TD]
[/TR]
[TR]
[TD="align: right"]3[/TD]
[/TR]
[TR]
[TD="align: right"]4[/TD]
[/TR]
[TR]
[TD="align: right"]5[/TD]
[/TR]
[TR]
[TD="align: right"]6[/TD]
[/TR]
</tbody>[/TABLE]

Furthermore, I'd like to ask, can we modify the above formula as per our requirement? What If I'm looking to sum value in every 2nd row? Can it be done by changing 3 to 2 in your formula?

Thanks
 
Upvote 0

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
Thanks for all the tips & tricks,

I encountered an error in a formula you've posted. when I'm trying to sum the below mentioned range for summing up every 3rd row with this formula =SUMPRODUCT($A$1:$A$6*(MOD(ROW($A$1:$A$6),3)=1)) it is giving result 5 whereas it should hv been 3 + 6 = 9. But after making slight variation in your formula i.e. =SUMPRODUCT($A$1:$A$6*(MOD(ROW($A$1:$A$6),3)=0)) then it works absolutely fine. Why it is so?

[TABLE="width: 64"]
<tbody>[TR]
[TD="width: 64, align: right"]1[/TD]
[/TR]
[TR]
[TD="align: right"]2[/TD]
[/TR]
[TR]
[TD="align: right"]3[/TD]
[/TR]
[TR]
[TD="align: right"]4[/TD]
[/TR]
[TR]
[TD="align: right"]5[/TD]
[/TR]
[TR]
[TD="align: right"]6[/TD]
[/TR]
</tbody>[/TABLE]

Furthermore, I'd like to ask, can we modify the above formula as per our requirement? What If I'm looking to sum value in every 2nd row? Can it be done by changing 3 to 2 in your formula?

Thanks

You seem not to have read the whole thread. The formula for summing values at every Nth row is:

=SUMPRODUCT($A$1:$A$6,--(MOD(ROW($A$1:$A$6)-ROW($A$1),n)=0))

where n = 1,2,...,N [ N = ROWS(Reference) ].

If you want to sum values at every 2nd row, set n to 2.
 
Upvote 0

Forum statistics

Threads
1,224,828
Messages
6,181,215
Members
453,024
Latest member
Wingit77

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top