How to sum every nth cell

Bob L

New Member
Joined
May 10, 2020
Messages
44
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
I'm looking for a way to sum every nth cell in a tab. In the example below, you can see that the consolidated view is a simple manual sum, but I'm looking for a way to automate the process. So if I'm adding a 4th store with quantity in cells C14 to E15, I'd like the sums in cells C2 to E3 to include them.

In this example, the quantities are every 3rd row, but I need to be able to modify this in the formula as it can change.

Thanks.

Book1
ABCDE
1201920202021
2AllShoes83023
3Cakes181114
4
5Store 1Shoes1812
6Cakes375
7
8Store 2Shoes5141
9Cakes839
10
11Store 3Shoes2810
12Cakes710
13
14
15
Sheet1
Cell Formulas
RangeFormula
C2:E3C2=C5+C8+C11
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
Hi, have you considered SUMIF, considering column B already has all you need? If not, SUMPRODCUT will do.

Book1
ABCDEFGHIJKLM
1201920202021201920202021201920202021
2AllShoes830238302383023
3Cakes181114181114181114
4
5Store 1Shoes181218121812
6Cakes375375375
7
8Store 2Shoes514151415141
9Cakes839839839
10
11Store 3Shoes281028102810
12Cakes710710710
Sheet1
Cell Formulas
RangeFormula
C2:E3C2=C5+C8+C11
G2:I3G2=SUMIF($B$5:$B$99,$B2,G$5:G$99)
K2:M3K2=SUMPRODUCT(--(MOD(ROW(K$5:K$99),3)=MOD(ROW(),3)),K$5:K$99)
 
Upvote 1
With Excel 365 you could use the FILTER function:
Book1
ABCDE
1201920202021
2AllShoes83023
3Cakes181114
4
5Store 1Shoes1812
6Cakes375
7
8Store 2Shoes5141
9Cakes839
10
11Store 3Shoes2810
12Cakes710
Sheet1
Cell Formulas
RangeFormula
C2:E3C2=SUM(FILTER(C$5:C$500,$B$5:$B$500=$B2,0))
 
Upvote 0

Forum statistics

Threads
1,223,231
Messages
6,170,884
Members
452,364
Latest member
springate

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