Home |
Search |
Today's Posts |
#1
|
|||
|
|||
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 |
#2
|
|||
|
|||
try
=sumproduct((P2:p200={a1,b1})*g2:g200) -- Don Guillett SalesAid Software "Mike@Q" wrote in message ... 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
|
|||
|
|||
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
|
|||
|
|||
"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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
SUMIF Criteria | Excel Discussion (Misc queries) | |||
SUMIF with only one criteria cell within range | Excel Discussion (Misc queries) | |||
sumif with 2 criteria | Excel Worksheet Functions | |||
Can I use a cell reference in the criteria for the sumif function. | Excel Worksheet Functions | |||
sumif 2 criteria | Excel Worksheet Functions |