Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 70
Default help with function

=SUMIF(Reason,(OR("B Scale",B Scale Night)),M20:M33)

I am trying to sum cells in column M20:M33 if the named cells "Reason"
contain the words "B Scale" or "B Scale Night"

What am I doing wrong?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 53
Default help with function

A good way to understand why a formla does not return expected result is to
select part of it and press F9, which then replaces the formula by its
result. In your case, if you select the OR(...) part, you see that Excel does
not like it very much. May be it is because of the missing quotes around the
second argument? No, still no luck.

In fact OR function only works with numbers, so in your case you should
proceed differently and add two SUMIF:
=SUMIF(Reason,"B Scale",M20:M33) + SUMIF(Reason,"B Scale Night",M20:M33)



"Barb" wrote:

=SUMIF(Reason,(OR("B Scale",B Scale Night)),M20:M33)

I am trying to sum cells in column M20:M33 if the named cells "Reason"
contain the words "B Scale" or "B Scale Night"

What am I doing wrong?

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 698
Default help with function

Try one of these:

The 2-part method
=SUMIF(Reasons,"b scale",M20:M33)+SUMIF(Reasons,"b scale night",M20:M33)

The combined 2-part method
=SUM(SUMIF(Reasons,{"b scale","b scale night"},M20:M33))

If you need to sum any cell beginning with "b scale"
=SUMIF(Reasons,"b scale*",M20:M33)

Does that help?
(Post back if you have more questions)
***********
Regards,
Ron

XL2003, WinXP


"Barb" wrote:

=SUMIF(Reason,(OR("B Scale",B Scale Night)),M20:M33)

I am trying to sum cells in column M20:M33 if the named cells "Reason"
contain the words "B Scale" or "B Scale Night"

What am I doing wrong?

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
DBSUM function but with function as criterion, not a range corne_mo Excel Worksheet Functions 3 July 13th 07 12:20 PM
LINKEDRANGE function - a complement to the PULL function (for getting values from a closed workbook) [email protected] Excel Worksheet Functions 0 September 5th 06 03:44 PM
Offset function with nested match function not finding host ss. MKunert Excel Worksheet Functions 1 March 21st 06 10:46 PM
Emulate Index/Match combo function w/ VBA custom function Spencer Hutton Excel Worksheet Functions 2 May 2nd 05 05:26 PM
Nested IF Function, Date Comparing, and NetworkDays Function carl Excel Worksheet Functions 2 December 29th 04 09:57 PM


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

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"