Sumif on values in multiple columns

G

Guest

I have 3 columns: Column A is a number, Column B is a text, Column C is text. I want to sum Column A based on the values of Columns B AND C. For example
A1 = 100 B1= Y C1=T
A2 = 50 B2 = N C2=T
A3 = 10 B3=Y C3=T
A4= 20 B4=N C4=T
I want to sum A1:A4 only if B1:B4 is "Y" and C1:c4 is "TA". I know how to write the formula for 1 sumif statement, but can't get a second string to work with it.
 
F

Frank Kabel

Hi
as SUMIF only accepts one condition you may use SUMPRODUCT:
=SUMPRODUCT((B1:B4="Y")*(C1:C4="TA"),A1:A4)

Frank
 
R

Roger Govier

Hi
Try
=SUMPRODUCT(--(B1:B4="Y)*(C1:C4="TA")*A1:A4)


--
Regards
Roger Govier
macs said:
I have 3 columns: Column A is a number, Column B is a text, Column C is
text. I want to sum Column A based on the values of Columns B AND C. For
example:
A1 = 100 B1= Y C1=TA
A2 = 50 B2 = N C2=TC
A3 = 10 B3=Y C3=TC
A4= 20 B4=N C4=TA
I want to sum A1:A4 only if B1:B4 is "Y" and C1:c4 is "TA". I know how to
write the formula for 1 sumif statement, but can't get a second string to
work with it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top