ozbeachbum
Board Regular
- Joined
- Jun 3, 2015
- Messages
- 237
- Office Version
- 2021
- Platform
- 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.
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 | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
B | C | D | E | F | G | H | I | |||
2 | 1200 | I have been using this formula in C2 to add every n row. | ||||||||
3 | I need to add every n row where it meets a criteria in column B. | |||||||||
4 | CBD | 400 | EG: Where the criteria is CBD, then the result would be 800. | |||||||
5 | 100 | |||||||||
6 | 100 | |||||||||
7 | 100 | |||||||||
8 | 100 | |||||||||
9 | ||||||||||
10 | CBl | 400 | ||||||||
11 | 100 | |||||||||
12 | 100 | |||||||||
13 | 100 | |||||||||
14 | 100 | |||||||||
15 | ||||||||||
16 | CBD | 400 | ||||||||
17 | 100 | |||||||||
18 | 100 | |||||||||
19 | 100 | |||||||||
20 | 100 | |||||||||
Sheet1 |
Cell Formulas | ||
---|---|---|
Range | Formula | |
C2 | C2 | =SUMPRODUCT((MOD(ROW(C4:C20)-4,6)=0)*(C4:C20)) |
C4,C16,C10 | C4 | =SUM(C5:C8) |