SUMIF Formula w/ OR Criteria

G

Guest

I have written the following formula =SUMIF(B5:B21,"partner",D5:D21) but
would like to include an OR criteria
=SUMIF(B5:B21,OR("partner","manager"),D5:D21) but it gives me an incorrect
value of zero. The first formula above yields the correct answer of "7500".
Is my syntax incorrect? Thank you in advance for your assistance.
 
R

Rob

You could simply use
=SUMIF(B5:B21,"partner",D5:D21)+SUMIF(B5:B21,"manager",D5:D21)
But I reckon there may be another way.......anyone?

Rob
 
D

Dave Peterson

It tells excel to treat that as an array.

Put some test data in A1:A2
put this in A3: =a1:a2
select A3, hit F2 and then hit F9.

Look at what you see in the formula bar.
 
G

Guest

Thanks for all the help.

Dave Peterson said:
It tells excel to treat that as an array.

Put some test data in A1:A2
put this in A3: =a1:a2
select A3, hit F2 and then hit F9.

Look at what you see in the formula bar.
 

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

Top