Sumif(or

  • Thread starter Thread starter Gmolatore
  • Start date Start date
G

Gmolatore

Can I use Sumif and OR in combination to add a column if one or another
condition is present in another column, such as
=SUMIF(OR(M8:M264,"=Issued"),(M8:M264,"=Delivered"),N8:N264)
where I want the sum of N8:N264 if M8:M264 is either "Issued" or "Delivered"
 
Try it like this:

=SUM(SUMIF(M8:M264,{"Issued","Delivered"},N8:N264))

Or, you could just use 2 SUMIFs:

=SUMIF(M8:M264,"Issued",N8:N264)+SUMIF(M8:M264,"Delivered",N8:N264)

Or, maybe this:

=SUMPRODUCT(--(ISNUMBER(MATCH(M8:M264,{"Issued","Delivered"},0))),N8:N264)

Or, using cells to hold the criteria:

A1 = Issued
B1 = Delivered

=SUMIF(M8:M264,A1,N8:N264)+SUMIF(M8:M264,B1,N8:N264)
=SUMPRODUCT(--(ISNUMBER(MATCH(M8:M264,A1:B1,0))),N8:N264)
 
Thanks! Worked like a charm! Used two SumIf's as you suggested
=SUMIF(M8:M264,"Issued",N8:N264)+SUMIF(M8:M264,"Delivered",N8:N264). I was
using a comma where you put the +, and I was using Sumif(OR( instead of SumIf
twice as in your suggestion. So those were the tips that made it all work! Is
there anywhere I can go to find lists of ways to use the Excel functions,
other than in Help in Excel?
 

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

Back
Top