Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
SJT SJT is offline
external usenet poster
 
Posts: 71
Default SUMIF Formula w/ OR Criteria

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.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default SUMIF Formula w/ OR Criteria

One way:

=SUM(SUMIF(B5:B21,{"partner","manager"},D5:D21))



SJT wrote:

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.


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.misc
Rob Rob is offline
external usenet poster
 
Posts: 27
Default SUMIF Formula w/ OR Criteria

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

Rob


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



  #4   Report Post  
Posted to microsoft.public.excel.misc
SJT SJT is offline
external usenet poster
 
Posts: 71
Default SUMIF Formula w/ OR Criteria

Thanks. What is the function that the "{" serve in your formula?

"Dave Peterson" wrote:

One way:

=SUM(SUMIF(B5:B21,{"partner","manager"},D5:D21))



SJT wrote:

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.


--

Dave Peterson

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default SUMIF Formula w/ OR Criteria

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.



SJT wrote:

Thanks. What is the function that the "{" serve in your formula?

"Dave Peterson" wrote:

One way:

=SUM(SUMIF(B5:B21,{"partner","manager"},D5:D21))



SJT wrote:

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.


--

Dave Peterson


--

Dave Peterson


  #6   Report Post  
Posted to microsoft.public.excel.misc
SJT SJT is offline
external usenet poster
 
Posts: 71
Default SUMIF Formula w/ OR Criteria

Thanks for all the help.

"Dave Peterson" wrote:

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.



SJT wrote:

Thanks. What is the function that the "{" serve in your formula?

"Dave Peterson" wrote:

One way:

=SUM(SUMIF(B5:B21,{"partner","manager"},D5:D21))



SJT wrote:

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.

--

Dave Peterson


--

Dave Peterson

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
Dynamic Range with unused formula messing up x axis on dynamic graph [email protected] Charts and Charting in Excel 2 February 2nd 06 08:02 PM
SUMIF with multiple criteria macquarl Excel Discussion (Misc queries) 4 January 5th 06 02:18 AM
SUMIF, multiple criteria Lauren753 Excel Discussion (Misc queries) 1 June 20th 05 08:28 PM
SUMPRODUCT Formula to Count Row of data Below Matched Criteria Sam via OfficeKB.com Excel Worksheet Functions 8 February 3rd 05 01:37 AM
"criteria" in a sumif refering to the value in another cell mark Excel Discussion (Misc queries) 1 January 31st 05 07:39 PM


All times are GMT +1. The time now is 10:57 AM.

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

About Us

"It's about Microsoft Excel"