Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Mike@Q
 
Posts: n/a
Default SUMIF with more than 1 criteria

Hi

I am trying to sum cells that fulfil either criteria A or criteria B. I have
tried =SUMIF(P:P,A1orB1,G:G). I can not simply add two SUMIF's together as I
need to reduce the length of the overall formula.

Thanks for your help

  #3   Report Post  
Aladin Akyurek
 
Posts: n/a
Default


It is unclear what criteria a cells or strings...

1.

=SUMPRODUCT(($P$2:$P$100=X1)+($P$2:$P$100=Y1),$G$2 :$G100)

2.

=SUM(SUMIF(P:P,{Crit1,Crit2},G:G))

A ctiterion that is string must be put between double quotes like in:

{"Orange","Kiwi"}

{10,12}

Mike@Q Wrote:
Hi

I am trying to sum cells that fulfil either criteria A or criteria B. I
have
tried =SUMIF(P:P,A1orB1,G:G). I can not simply add two SUMIF's together
as I
need to reduce the length of the overall formula.

Thanks for your help



--
Aladin Akyurek
------------------------------------------------------------------------
Aladin Akyurek's Profile: http://www.excelforum.com/member.php...fo&userid=4165
View this thread: http://www.excelforum.com/showthread...hreadid=320407

  #5   Report Post  
Harlan Grove
 
Posts: n/a
Default

"Aladin Akyurek" wrote...
....
2.

=SUM(SUMIF(P:P,{Crit1,Crit2},G:G))

....

Dangerous in the general case, e.g.,

=SUM(SUMIF(P:P,{"a*","*z"},G:G))

This idiom only works when the criteria are mutually exclusive.


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 Criteria Brent Martin Excel Discussion (Misc queries) 6 January 7th 05 06:17 AM
SUMIF with only one criteria cell within range Stan Excel Discussion (Misc queries) 5 December 16th 04 11:12 PM
sumif with 2 criteria Jamie Excel Worksheet Functions 2 November 11th 04 05:48 PM
Can I use a cell reference in the criteria for the sumif function. Number Cruncher Excel Worksheet Functions 2 November 4th 04 08:52 PM
sumif 2 criteria Doug Excel Worksheet Functions 1 October 27th 04 05:06 PM


All times are GMT +1. The time now is 11:58 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"