Log in

View Full Version : SUMIF With Multiple Criteria In The Same Column Criteria Range



Howardc
08-11-2012, 05:36 PM
I have the following formula in Col C

=SUMIFS(C$275:C$379,$A275:$A$379,{"Idle Time","Oil stock *"})

The criteria "Idle Time" & "Oil stock losses" are in Col A.

I would like to add the values in Col C based on "Idle Time" & "Oil stock losses" which are in Col A

The formula =SUMIFS(C$275:C$379,$A275:$A$379,{"Idle Time","Oil stock *"}) adds the idle time value correctly, but ignore the values of Oil Stock losses

It would be appreciated if someone could assist me

Excel Fox
08-11-2012, 07:38 PM
=SUMPRODUCT(((A1:A2="Idle Time")+(Left(A1:A2,10)="Oil stock "))*B1:B2)

Howardc
08-11-2012, 07:59 PM
Thanks for the help, much appreciated

Admin
08-11-2012, 09:24 PM
Hi

You could also try

=SUMPRODUCT(--(ISNUMBER(SEARCH({"Idle Time","Oil Stock"},A2:A15)))*C2:C15)

Howardc
08-11-2012, 10:50 PM
Hi

Thanks for the help, much appreciated