Sumif with two criteria

D

danperez

I need to add column c if column a and column b both meet
my criteria.

example
A B C
1 X Y 3
2 S Y 1
3 X Y 2
4 X F 3
5 F Y 3

X AND Y 5
 
R

Ron Rosenfeld

I need to add column c if column a and column b both meet
my criteria.

example
A B C
1 X Y 3
2 S Y 1
3 X Y 2
4 X F 3
5 F Y 3

X AND Y 5


One way: *array-enter*

=SUM((A="X")*(B="Y")*C_)

To *array-enter* a formula, after typing or copying it in, hold down
<ctrl><shift> while hitting <enter>. XL will place braces {...} around the
formula.

--ron
 
J

James S

If you can add another column, the solution below
will work:

COLUMN D FORMULAS =(A1 & B1)

A B C D
1 X Y 3 XY
2 S Y 1 SY
3 X Y 2 XY
4 X F 3 XF
5 F Y 3 FY
6
7 5

FORMULA FOR CELL A7 =SUMIF(D1:D5,"XY",C1:C5)

Hope that helps.

Regards,
James S
 

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