#value error for simple calculation

  • Thread starter Thread starter Peter McCaul
  • Start date Start date
P

Peter McCaul

In cell E6, I have this calculation: =d6*.95. When I have a number in d6,
the formula works fine but when I take the number out of d6, I get the
#value error. Is there a way around this so that cell E6 is left blank when
there's no number in d6? Thanks for any help.
 
Hi Peter

embed your formula in an if statement,
e.g.
=IF(D6="","",d6*.95)

Cheers
JulieD
 
This won't work if, as I suspect, Peter is "tak(ing) the number out of
d6" by pressing the space bar instead of using Del/Delete (if he were
using the latter, he wouldn't be getting the #VALUE! error). This
modification will work in that case:

=IF(LEN(TRIM(D6))=0,"",D6*0.95)

or

=IF(COUNT(D6),D6*0.95,"")
 
Hi Jim

you're probably right, i was surprised about the #VALUE bit ... but didn't
think of the "spacebar method of deleting"!

Cheers
JulieD
 
Back
Top