SumIF Formula

R

Rody2003

I need to sum a column based on two different variables. For example I need
to sum Column A if Column B = 123 and Column C = XD. For the example below
the sumif formula would equal "11." I have tried creating this formula
several times but I have yet to succeed as I have always gotten some type of
error. I could use the dsum formula but I would like to stick to"if"
formulas. Any suggestions?

Col. A Col. B Col.C
1 123 XD
5 222 XD
10 123 CC
10 123 XD
 
J

John C

SUMPRODUCT is the way to go here.

=SUMPRODUCT(--($B$2:$B$100=123),--($C$2:$C$100="XD"),($A$2:$A$100))

Note, I am assuming all values in column A and column B are numbers, not text.
 
R

Rody2003

How do I mark this as answered?

John C said:
SUMPRODUCT is the way to go here.

=SUMPRODUCT(--($B$2:$B$100=123),--($C$2:$C$100="XD"),($A$2:$A$100))

Note, I am assuming all values in column A and column B are numbers, not text.
 
M

Max

How do I mark this as answered?

From where you're posting / reading responses, ie in MS' webpages
just click the "Yes" button (like the one below) in John's response

Do note that in John's response, the parens around: $A$2:$A$100
is not necessary, ie it could be just:

=SUMPRODUCT(--($B$2:$B$100=123),--($C$2:$C$100="XD"),$A$2:$A$100)
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:20,500 Files:362 Subscribers:64
xdemechanik
---
 

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