waterconsultant
New Member
- Joined
- Oct 18, 2016
- Messages
- 18
Sorry for this trivial problem, but it has me stumped. Trying to SUM a range of values in the range C2:G4 depending on 2 criteria. a) the test value of the row in Row 5. In this EXAMPLE the target value is "XX", and any matching column occurrences of XX need to be summed across the row. b) There are also 3 possible scenarios, High, Medium, Low. Say the scenario is 'Low', and therefore the formula below returns 12+14 = 26, BUT I have 'hard-coded' the row in C4:G4. What I can't fix is how I introduce a lookup/match function so that I can change the row number (i.e. 2, 3 or 4). Any solution is fine as long as I keep some form of offset (reason being that this data block is repeated across the sheet, and therefore the offset position (currently A1) also moves.
=SUMIF(OFFSET(A1,4,2,1,5),"XX",C4:G4)
(sorry folks, every time I carefully format the data, preview completely trashes the layout. Don;t know how to fix that
A B C D E F G
1
2 High 20 50 30 10
3 Medium 15 10 11 25
4 Low 12 14
5 DD XX YY BB XX[TABLE="width: 549"]
<tbody>[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
Any support very gratefully appreciated.
Brian F
=SUMIF(OFFSET(A1,4,2,1,5),"XX",C4:G4)
(sorry folks, every time I carefully format the data, preview completely trashes the layout. Don;t know how to fix that
A B C D E F G
1
2 High 20 50 30 10
3 Medium 15 10 11 25
4 Low 12 14
5 DD XX YY BB XX[TABLE="width: 549"]
<tbody>[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
Any support very gratefully appreciated.
Brian F