SUM Formula to Add Every Nth Row

adamginger

New Member
Joined
Feb 9, 2017
Messages
12
Hello!

I am having some trouble trying to add cell values together starting from N14 through to N1805.
I would like the formula to include these cells and every 9th cell in between.
For Example, the first cell in the sum would be N14, then N23... Through to N1805.

I believe it is a MOD function that I would need to use however I cannot get other examples work for my application.

If you could also break down your reply as to how this formula works, it would be appreciated.

Thanks in advanced!
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
=SUMPRODUCT(N(MOD(ROW(N14:N1805),9)=5),N14:N1805)

ROW(N14:N1805) is 14;15;16;...;1805
MOD(that,9) is 5,6,7,8,0,1,2,3,4,5,6,7,8,0...
When that's a 5, we have one of the cells wanted, so
N(MOD(ROW(...))) is true;false;false;false... and whenever the remainder is 5, it's true.
Multiply these by N14 thru N1805 will be N14 * true (or N14), N15 * false (or 0),etc. Only the values from N14, N23, N32, etc will be added together.
 
Upvote 0
Apologies, the cells are N13 through N1804 (Inclusive) :)
Try one of these...

If you will never insert new rows before the data range:

Array entered**...

=SUM(IF(MOD(ROW(N13:N1804),9)=4,N13:N1804))

If you might insert new rows before the data range:

Array entered**...

=SUM(IF(MOD(ROW(N13:N1804)-ROW(N13),9)=0,N13:N1804))

** array formulas need to be entered using the key
combination of CTRL,SHIFT,ENTER (not just ENTER).
Hold down both the CTRL key and the SHIFT key
then hit ENTER.
 
Last edited:
Upvote 0
Okay, so I have managed to get this to work for cells N13 though N1804, which is great however if I change the formula to do the same with N11 through N1802 I cannot get the cells to add together, even though they are still 9 cells apart from each other. I don't know if it's obvious but I can seem to get it to work.
Any help would be appreciated :)
Thanks for your previous responses.
 
Upvote 0
Okay, so I have managed to get this to work for cells N13 though N1804, which is great however if I change the formula to do the same with N11 through N1802 I cannot get the cells to add together, even though they are still 9 cells apart from each other. I don't know if it's obvious but I can seem to get it to work.
Any help would be appreciated :)
Thanks for your previous responses.

Nevermind I have managed to work out a solution!]
 
Upvote 0

Forum statistics

Threads
1,223,228
Messages
6,170,871
Members
452,363
Latest member
merico17

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