J
joshuadonner
I'm using a variation on the following formula to sum values from a
particular column for records that meet 3 criteria:
=SUM(IF(Range1=Value1,IF(Range2=Value2,IF(Range3=Value3,RangeToSum,0),0),0))
in other words:
A B C D
1 1 3 5 7
2 0 4 5 8
3 2 3 5 9
4 2 4 6 10
5 2 3 6 11
{=SUM(IF(A1:A5=2,if(B1:B5=3,if(C1:C5=5,D15,0),0),0))} = 9
But what i want to do is make one of the conditions allow multiple
values. For example, in the above example, instead of only counting
the record if column A = 1, I want to count the record if Column A = 1
or 2. Or something like:
'{=SUM(IF(OR(A1:A5=1,A1:A5=2),if(B1:B5=3,if(C1:C5=5,D15,0),0),0))} =
7+9 = 16
The values in the real data for column A are code numbers, so I can't
use logical operators like "if(A1:A5>1,,)"
Any guidance on how to approach this would be most welcome. (maybe i'm
going about the whole thing wrong...?!)
thanks,
josh
particular column for records that meet 3 criteria:
=SUM(IF(Range1=Value1,IF(Range2=Value2,IF(Range3=Value3,RangeToSum,0),0),0))
in other words:
A B C D
1 1 3 5 7
2 0 4 5 8
3 2 3 5 9
4 2 4 6 10
5 2 3 6 11
{=SUM(IF(A1:A5=2,if(B1:B5=3,if(C1:C5=5,D15,0),0),0))} = 9
But what i want to do is make one of the conditions allow multiple
values. For example, in the above example, instead of only counting
the record if column A = 1, I want to count the record if Column A = 1
or 2. Or something like:
'{=SUM(IF(OR(A1:A5=1,A1:A5=2),if(B1:B5=3,if(C1:C5=5,D15,0),0),0))} =
7+9 = 16
The values in the real data for column A are code numbers, so I can't
use logical operators like "if(A1:A5>1,,)"
Any guidance on how to approach this would be most welcome. (maybe i'm
going about the whole thing wrong...?!)
thanks,
josh