Nested SumIf statement

J

jlhart76

I'm trying to sum a group of numbers based on two variables. The SumI
statement isn't working right, neither is SumProduct. Can someone help
Here's what the formula should calculate:

IF (B2:B1589="ICM") and IF (C2:C1589="Yes"), then SUM (E2:E1589
 
R

Roger Govier

Hi

Try
=SUMPRODUCT(--(B2:B1589="BCN"),--(C2:C1589="Yes"),E2:E1589)
assuming values in E2:E1589 are numeric.
 
B

Bob Phillips

I'd bet it doesn't, not with unequal ranges. #N/A is more likely.

--

HTH

RP
(remove nothere from the email address if mailing direct)
 
J

John Michl

Thanks for the catch Bob. D3:D6 should be D2:D1589. I hadn't finished
editing my test formula.

- John
 
R

Roger Govier

Hi

Where on earth did I get BCN from?
You were looking for ICM.
The formula should be (of course)
=SUMPRODUCT(--(B2:B1589="ICM"),--(C2:C1589="Yes"),E2:E1589)
 
J

jlhart76

It worked! Thanks so much.

& thanks to everyone else for helping me, I appreciate it.
 
Top