SUMIF multiple criteria

G

Guest

I've written the formula below, but I'm getting a result of zero. I'm trying
to sum cells C5:C750 where cells D5:D750 are equal to either a zero or an
#N/A value.

By just specifying the zero or just specifying the #N/A, I get the correct
result, but I need to combine the two.

=SUMIF('Business Both Years'!D5:D750,"0"&"#N/A",'Business Both Years'!C5:C750)

Any ideas?
 
A

alasdair_gifford

Personally I would go for the DSUM formula, but without your range and
column headings I can't give you a sensible example.

Giff
 
G

Guest

Thanks for your prompt response. That works a treat!

In another cell, what would I need to enter to sum cells C5:C750 where
D5:D750 DO NOT equal zero or #N/A. When I use the following formula
(adopting the solution you suggested), the result identifies a) all the cells
in column C where cells in column D do not equal zero and b) all the cells in
column C where cells in column D do not equal #N/A, and combining the
results, i.e. it's duplicating the results because there is multiple criteria.

=SUMIF('Business Both Years'!D5:D750,"<>0",'Business Both
Years'!C5:C750)+SUMIF('Business Both Years'!D5:D750,"<>#N/A",'Business Both
Years'!C5:C750)
 
G

Guest

Just subtract our first fomula from the total count of values.

=COUNTA(C5:C750)-the results of the first cell.
 
G

Guest

That's great! - I used SUM instead of COUNTA, but I still got the desired
result, thank you!
 

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