How do I add a second criteria to the SUMIF or DSUM function?

G

Guest

I am using Excel 2003 and I need to write a function to select numbers in a
column based on two separate criteria and then sum those selected numbers. I
have tried SUMIF and DSUM but either these functions will not allow a second
criteria to be added or I am doing it wrong. Any suggestions would be
appreciated
 
G

Guest

Sumif doesn't support multiple criteria (you'd have to use sumproduct
instead, generate arrays of true/false which get converted to 1/0). DSUM
certainly supports multiple criteria. Your criteria range would have to be
multiple columns, with the column headers matching those columns of your data
range you want to filter.
Could you provide more info, say what you've got so far and what you're
trying to do?
--Bruce
 
J

John Michl

You can't but you could use a SUMPRODUCT function to accomplish the
same thing. Try:

=SUMPRODUCT(--(A1:A10="A"), --(B1:B10)="B",C1:C10)

Hope that helps.

- John Michl
 

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

Similar Threads

SUMIF with criteria "<>" & "=" 4
dsum or sumif? 2
DSUM - Modifying the function... 1
DSUM criteria 3
SUMIF function criteria options 4
=sumif function 1
SUMIF Function ? 1
Multiple SUMIF criteria 1

Top