Excel 2007 SUMIFS

C

C3PU10

Hello
How can I use OR operator in the SUMIFS function?
I have 4 columns:

Value Pay Period Supplier Type
100 9 Local L
200 9 Local K
300 10 US L

I want to sum all the values of: suppliers = local, period = 9 and
type = (L or K)
I just don't know how to approach the "L or K" problem...

Thanks,
 
R

Roger Govier

Hi

I don't think you can use an OR within SUMIFS.
Try
=SUMPRODUCT((B2:B4=9)*(C2:C4="Local")*(D2:D4={"L","K"})*(A2:A4))

If you want to use SUMIFS, then add a helper column with
=IF(OR(D2="K",D2="L"),1,0)
then use
=SUMIFS(A2:A4,B2:B4,9,C2:C4,"Local",E2:E4,1)
 
C

C3PU10

Thank you very much!
This is much better then my:
=SUMIFS(A2:A4,B2:B4,9,C2:C4,"Local",D2:D4,"L")
+SUMIFS(A2:A4,B2:B4,9,C2:C4,"Local",D2:D4,"K")

:)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

another sumifs plea 6
Formula assistance column match sum 3
function help, sumif?? 2
what to use 2
SUMIF showing wrong values 2
IF statements with multiple criteria 2
Sumif but taking a value 5
multiple match 4

Top