ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Sumif(or (https://www.excelbanter.com/excel-discussion-misc-queries/184475-sumif.html)

Gmolatore

Sumif(or
 
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"

T. Valko

Sumif(or
 
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,"De livered",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:N26 4)
=SUMPRODUCT(--(ISNUMBER(MATCH(M8:M264,A1:B1,0))),N8:N264)


--
Biff
Microsoft Excel MVP


"Gmolatore" wrote in message
...
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"




Gmolatore

Sumif(or
 
Thanks! Worked like a charm! Used two SumIf's as you suggested
=SUMIF(M8:M264,"Issued",N8:N264)+SUMIF(M8:M264,"De livered",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?

"T. Valko" wrote:

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,"De livered",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:N26 4)
=SUMPRODUCT(--(ISNUMBER(MATCH(M8:M264,A1:B1,0))),N8:N264)


--
Biff
Microsoft Excel MVP


"Gmolatore" wrote in message
...
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"





T. Valko

Sumif(or
 
You're welcome. Thanks for the feedback!

Is there anywhere I can go to find lists of ways to
use the Excel functions, other than in Help in Excel?


This site has a lot of general use formulas:

http://cpearson.com/excel/mainpage.aspx


--
Biff
Microsoft Excel MVP


"Gmolatore" wrote in message
...
Thanks! Worked like a charm! Used two SumIf's as you suggested
=SUMIF(M8:M264,"Issued",N8:N264)+SUMIF(M8:M264,"De livered",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?

"T. Valko" wrote:

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,"De livered",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:N26 4)
=SUMPRODUCT(--(ISNUMBER(MATCH(M8:M264,A1:B1,0))),N8:N264)


--
Biff
Microsoft Excel MVP


"Gmolatore" wrote in message
...
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"








All times are GMT +1. The time now is 07:12 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com