SUMIFS and OR
"Michael" wrote...
This only returns true or false, if you are trying to add them together
use this:
=IF(OR(SUMIF(A2:A5,"RU",B2:B5),SUMIF(A2:A5,"WE",B 2:B5),
SUMIF(A2:A5,"US",B2:B5),SUMIF(A2:A5,"PE",B2:B5)), SUM(B2:B5),"")
--
If this posting was helpful, please click on the Yes button.
....
How could this have been useful to anyone except as an example of a
respondent who doesn't understand Excel formulas or can't comprehend OP's
questions?
OR(SUMIF(A2:A5,"RU",B2:B5),SUMIF(A2:A5,"WE",B2:B5) ,
SUMIF(A2:A5,"US",B2:B5),SUMIF(A2:A5,"PE",B2:B5))
is very close to a COMPLETELY MEANINGLESS expression. It'd only be false
when the sums corresponding to RU, WE ir US in col A are each zero, but col
B contains positive, negative or zero values, then there could be col A
entries that nevertheless sum to 0. Do you really believe the OP would want
to display "" in that case?
|