#value error for simple calculation

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.
 
J

JulieD

Hi Peter

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

Cheers
JulieD
 
J

JE McGimpsey

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,"")
 
J

JulieD

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
 

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