ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   SUMIF multiple criteria (https://www.excelbanter.com/excel-worksheet-functions/208257-sumif-multiple-criteria.html)

zia

SUMIF multiple criteria
 
Hi,
I have two columns A and B. A column has Account # and B column has amounts
A B
10 100
11 200
10 300
13 400
14 500
11 600
Now I want to sum column B if value in column A is either equal to 10 OR 11?
so the formula in the above example should return 1200.
Thanks in advance



Gary''s Student

SUMIF multiple criteria
 
=SUMPRODUCT((A1:A6=10)*B1:B6)+SUMPRODUCT((A1:A6=11 )*B1:B6)

--
Gary''s Student - gsnu200810


"Zia" wrote:

Hi,
I have two columns A and B. A column has Account # and B column has amounts
A B
10 100
11 200
10 300
13 400
14 500
11 600
Now I want to sum column B if value in column A is either equal to 10 OR 11?
so the formula in the above example should return 1200.
Thanks in advance



TomPl

SUMIF multiple criteria
 
=SUMIF(A1:A6,10,B1:B6)+SUMIF(A1:A6,11,B1:B6)

or

=SUM(SUMIF(A1:A6,{10,11},B1:B6))

Pete_UK

SUMIF multiple criteria
 
Try it this way:

=SUMIF(A:A,10,B:B) + SUMIF(A:A,11,B:B)

Hope this helps.

Pete

On Oct 29, 4:14*pm, Zia wrote:
Hi,
I have two columns A and B. A column has Account # and B column has amounts *
A * * * * * * * *B
10 * * *100
11 * * *200
10 * * *300
13 * * *400
14 * * *500
11 * * *600
Now I want to sum column B if value in column A is either equal to 10 OR 11?
so the formula in the above example should return *1200.
Thanks in advance



zia

SUMIF multiple criteria
 
Many Thanks Gary''s Student and Tom. Both the solutions work just great.

"Zia" wrote:

Hi,
I have two columns A and B. A column has Account # and B column has amounts
A B
10 100
11 200
10 300
13 400
14 500
11 600
Now I want to sum column B if value in column A is either equal to 10 OR 11?
so the formula in the above example should return 1200.
Thanks in advance




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

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