ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Can I use two criteria in the SUMIF worksheet function? (https://www.excelbanter.com/excel-discussion-misc-queries/53382-can-i-use-two-criteria-sumif-worksheet-function.html)

Patricia

Can I use two criteria in the SUMIF worksheet function?
 
Would appreciate knowing if anyone knows how to do this, and if so what is
the syntax. Thanks.

Bernard Liengme

Can I use two criteria in the SUMIF worksheet function?
 
No, but you can use multiple criteria with SUMPRODUCT.
Example =SUMPRODUCT(--(A1:A100="Jack"),--(B1:B100="Car"),C1:C100=5, D1:D100)
will sum d1:d100 cells provides corresponding A cell has Jack, B cell has
Cars and C cells equals 5

See also http://contextures.com/xlFunctions01.html#SumProduct

--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email

"Patricia" wrote in message
...
Would appreciate knowing if anyone knows how to do this, and if so what is
the syntax. Thanks.




Alan

Can I use two criteria in the SUMIF worksheet function?
 
No, you can only use one criteria with SUMIF, but with SUMPRODUCT there is
no limit to how many criteria that can be used apart from the fact that it
is a volatile function, and if used in large ranges it will take a
significant time to calculate, more so if it's looking for more than one
criteria.
If you do need to use large (several hundreds or thousands) of SUMPRODUCT
formulas then probably the best way to go is a Pivot Table.
Check out this link, it'll take a while to read but it really is worth the
effort,
http://www.xldynamic.com/source/xld.SUMPRODUCT.html
Regards,
Alan.
"Patricia" wrote in message
...
Would appreciate knowing if anyone knows how to do this, and if so what is
the syntax. Thanks.





All times are GMT +1. The time now is 05:50 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com