ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Can SUMIF function include AND function (https://www.excelbanter.com/excel-worksheet-functions/26411-can-sumif-function-include-function.html)

ShaneS

Can SUMIF function include AND function
 
How do I formulate a SUMIF function to include more than 1 condition? I need
to sum up a column based on conditions in 2 other columns. eg:

1 5 8
2 5 8
2 5 9

I need to add up values in the third column (C), when the corresponding
column A value is 2, AND column B value is 5. Answer should be 17 in this
case. In other words, how do I combine SUMIF(A:A,2,C:C) and SUMIF(B:B,5,C:C)?

Thanks in advance for your Help!

Shane.

JE McGimpsey

one way:

=SUMPRODUCT(--(A1:A1000=2),--(B1:B1000=5),C1:C1000)


For an explanation of the use of "--" see

http://www.mcgimpsey.com/excel/doubleneg.html



In article ,
ShaneS wrote:

How do I formulate a SUMIF function to include more than 1 condition? I need
to sum up a column based on conditions in 2 other columns. eg:

1 5 8
2 5 8
2 5 9

I need to add up values in the third column (C), when the corresponding
column A value is 2, AND column B value is 5. Answer should be 17 in this
case. In other words, how do I combine SUMIF(A:A,2,C:C) and SUMIF(B:B,5,C:C)?

Thanks in advance for your Help!

Shane.



All times are GMT +1. The time now is 10:17 PM.

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