Neater "=if "transaction

B

billy_bags

=IF(ROUND(C10*1.2/38,0)<1,"1",ROUND(C10*1.2/38,0))

However, if cell c10 has no figure in it at all I want it to show "0"

I have tried
=if(c10 "","0",ROUND(C10*1.2/38,0)<1,"1",ROUND(C10*1.2/38,0))
but the formula error box appears
Can some kind soul enlighten me and
Is there a neater way that I can express this formula
Thanks Bill
 
D

Don Guillett

you forgot the second if

=if(c10 "","0",if(ROUND(C10*1.2/38,0)<1,1,ROUND(C10*1.2/38,0))
 
D

David Biddulph

billy_bags said:
=IF(ROUND(C10*1.2/38,0)<1,"1",ROUND(C10*1.2/38,0))

However, if cell c10 has no figure in it at all I want it to show "0"

I have tried
=if(c10 "","0",ROUND(C10*1.2/38,0)<1,"1",ROUND(C10*1.2/38,0))
but the formula error box appears
Can some kind soul enlighten me and
Is there a neater way that I can express this formula

Do you mean:
=IF(C10="","0",IF(ROUND(C10*1.2/38,0)<1,"1",ROUND(C10*1.2/38,0))) ?
 
R

Ragdyer

First of all, you left out the equal sign:
=If(C10="",

And, you have too many arguments for a single "IF" function.

Also, if you're dealing strictly in numbers, you should *not* enclose them
in quotes:
"1"
"0"
Since this will return text.

Anyway, try this:

=(C10>0)*(ROUND(C10*1.2/38,0)<1)*1+ROUND(C10*1.2/38,0)
 
Top