#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10
Default SUMIF with OR

Good morning:

I'm running XL 2007, SP1 under WinXP.

I need to sum a range based on whether another range is either "DSO" or
"OOJ", i.e =SUMIF(OR(B$2:B$40="DSO","OOJ",),C$2:C$40)This formula obviously
doesn't work, and I can't seem to get the syntax correct. Should I be using
the double hyphen here?

Thank you for your assistance.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,420
Default SUMIF with OR

=SUM(SUMIF(B$2:B$40,{"DSO","OOJ"},C$2:C$40))

--
__________________________________
HTH

Bob

"dave roth" wrote in message
...
Good morning:

I'm running XL 2007, SP1 under WinXP.

I need to sum a range based on whether another range is either "DSO" or
"OOJ", i.e =SUMIF(OR(B$2:B$40="DSO","OOJ",),C$2:C$40)This formula
obviously
doesn't work, and I can't seem to get the syntax correct. Should I be
using
the double hyphen here?

Thank you for your assistance.



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4,393
Default SUMIF with OR

To sum B values if A column is "a" or "b"
1) =SUMIF(A1:A6,"a",B1:B6)+SUMIF(A1:A6,"b",B1:B6)
or
2) =SUMPRODUCT((A1:A6={"a","b"})*B1:B6)
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"dave roth" wrote in message
...
Good morning:

I'm running XL 2007, SP1 under WinXP.

I need to sum a range based on whether another range is either "DSO" or
"OOJ", i.e =SUMIF(OR(B$2:B$40="DSO","OOJ",),C$2:C$40)This formula
obviously
doesn't work, and I can't seem to get the syntax correct. Should I be
using
the double hyphen here?

Thank you for your assistance.



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default SUMIF with OR

Try:

=SUMPRODUCT((B2:B40="DSO")+(B2:B40="OOJ"),(C2:C40) )

--
Gary''s Student - gsnu200810


"dave roth" wrote:

Good morning:

I'm running XL 2007, SP1 under WinXP.

I need to sum a range based on whether another range is either "DSO" or
"OOJ", i.e =SUMIF(OR(B$2:B$40="DSO","OOJ",),C$2:C$40)This formula obviously
doesn't work, and I can't seem to get the syntax correct. Should I be using
the double hyphen here?

Thank you for your assistance.

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10
Default SUMIF with OR

Thank you sir.

"Bob Phillips" wrote:

=SUM(SUMIF(B$2:B$40,{"DSO","OOJ"},C$2:C$40))

--
__________________________________
HTH

Bob

"dave roth" wrote in message
...
Good morning:

I'm running XL 2007, SP1 under WinXP.

I need to sum a range based on whether another range is either "DSO" or
"OOJ", i.e =SUMIF(OR(B$2:B$40="DSO","OOJ",),C$2:C$40)This formula
obviously
doesn't work, and I can't seem to get the syntax correct. Should I be
using
the double hyphen here?

Thank you for your assistance.






  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10
Default SUMIF with OR

Thank you sir.

"Bernard Liengme" wrote:

To sum B values if A column is "a" or "b"
1) =SUMIF(A1:A6,"a",B1:B6)+SUMIF(A1:A6,"b",B1:B6)
or
2) =SUMPRODUCT((A1:A6={"a","b"})*B1:B6)
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"dave roth" wrote in message
...
Good morning:

I'm running XL 2007, SP1 under WinXP.

I need to sum a range based on whether another range is either "DSO" or
"OOJ", i.e =SUMIF(OR(B$2:B$40="DSO","OOJ",),C$2:C$40)This formula
obviously
doesn't work, and I can't seem to get the syntax correct. Should I be
using
the double hyphen here?

Thank you for your assistance.




  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10
Default SUMIF with OR

Thank you sir.

"Gary''s Student" wrote:

Try:

=SUMPRODUCT((B2:B40="DSO")+(B2:B40="OOJ"),(C2:C40) )

--
Gary''s Student - gsnu200810


"dave roth" wrote:

Good morning:

I'm running XL 2007, SP1 under WinXP.

I need to sum a range based on whether another range is either "DSO" or
"OOJ", i.e =SUMIF(OR(B$2:B$40="DSO","OOJ",),C$2:C$40)This formula obviously
doesn't work, and I can't seem to get the syntax correct. Should I be using
the double hyphen here?

Thank you for your assistance.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
sumif for multi conditions. i.e sumif(A1:A10,"Jon" and B1:B10,"A" Harry Seymour Excel Worksheet Functions 9 June 12th 07 10:47 PM
Sumif Scorpvin Excel Discussion (Misc queries) 12 October 1st 05 07:32 PM
Embedding a Sumif in a sumif C.Pflugrath Excel Worksheet Functions 5 August 31st 05 07:31 PM
nested sumif or sumif with two criteria dshigley Excel Worksheet Functions 5 April 5th 05 03:34 AM
SUMIF - Range name to used for the "sum_range" portion of a SUMIF function Oscar Excel Worksheet Functions 2 January 12th 05 12:01 AM


All times are GMT +1. The time now is 01:10 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"