What is wrong with this formula

K

Kim

Hi. I'm new to this formula stuff so please answer so that I can understand.
I thought I'd copied the format correctly (from Microsaft SUMIF Help) but I
keep getting an error message that something is wrong. I can't see what
though... The Function button seems to show that everything is correct.
=SUMIF(D10+D11-D13,">0",(D10+D11-D13)*$A10)

It's to display a percentage (A10) of a sum if the sum is >0.
If it's <=0 then no sum is needed. Or, in fact, I'd rather display '0' in
the cell. How would I do that?
Thanks.
 
B

bapeltzer

SUMIF is used to evaluate a range of input cells and conditionally add
corresponding values. You just need a simple IF:
=if((D10+D11-D13)>0,(D10+D11-D13)*$A10,0)
 
S

Shane Devenshire

Hi,

Here is a short formula that seems to do what you want:

=(D10+D11-D13)*$A10

If the value inside the ()'s is 0 then 0*A10 gives 0 otherwise the
calculation is done.
 
D

David Biddulph

No, Shane. That would be wrong if (D10+D11-D13) is negative.

You could use =MAX((D10+D11-D13),0)*$A10
 

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