Add every n row meeting a criteria

ozbeachbum

Board Regular
Joined
Jun 3, 2015
Messages
237
Office Version
  1. 2021
Platform
  1. Windows
Hi Everyone,
I need to add every n row meeting a criteria in another column.
I am currently the following formula to add every n row, but have been unable to work out how to have it only add those cells in the range that meet the criteria in another column.
SUMPRODUCT((MOD(ROW(C4:C20)-4,6)=0)*(C4:C20))
Any assistance would be greatly appreciated.
Cheers,
Dave.

sum n row criteria.xlsx
BCDEFGHI
21200I have been using this formula in C2 to add every n row.
3I need to add every n row where it meets a criteria in column B.
4CBD400EG: Where the criteria is CBD, then the result would be 800.
5100
6100
7100
8100
9
10CBl400
11100
12100
13100
14100
15
16CBD400
17100
18100
19100
20100
Sheet1
Cell Formulas
RangeFormula
C2C2=SUMPRODUCT((MOD(ROW(C4:C20)-4,6)=0)*(C4:C20))
C4,C16,C10C4=SUM(C5:C8)
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
How about
Excel Formula:
=SUMIFS(C4:C50,B4:B50,"CBD")
 
Upvote 0
Solution
How about
Excel Formula:
=SUMIFS(C4:C50,B4:B50,"CBD")
Thanks so much, do simple.
I'm thinking I needed to still add every n row, but because there is a criteria it only adds those that meet the criteria.
I noticed you show the England Rugby Emblem.
It would be great to see them in Australia again.
 
Upvote 0
Glad to help & thanks for the feedback.
It would be great to see them in Australia again.
Our 2022 summer tour is there (Covid dependant), so hopefully won't be long.
 
Upvote 0

Forum statistics

Threads
1,224,836
Messages
6,181,252
Members
453,028
Latest member
letswriteafairytale

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