#VALUE! Error

B

bgcooker

I have a cell in F8 with the formula =E8/C8, that references a formula in E8
containing an IF function formual: =IF((D8-C8)<=0,"",(D8-C8)). These
formulas are used throughout the spreadsheet.

A #VALUE! shows in column F if there are no values in the cells referred to
in the formulas. Is there a way to stop this from showing in the spreadsheet?
 
M

MyVeryOwnSelf

I have a cell in F8 with the formula =E8/C8, that references a formula
in E8 containing an IF function formual: =IF((D8-C8)<=0,"",(D8-C8)).
These formulas are used throughout the spreadsheet.

A #VALUE! shows in column F if there are no values in the cells
referred to in the formulas. Is there a way to stop this from showing
in the spreadsheet?

One way is to use something like this in F8:
=IF(C8=0,"undefined",N(E8)/C8)
The N() function addresses the problem you asked about. Without it, F8
might be trying to do arithmetic combining a number (in C8) with a text
value (""); the two don't mix well that way. See Excel's built-in Help for
details of the N() function.

The IF() deals with potential division-by-zero errors.

If C8 contains a formula that might return "" then use N(C8) in the
formulas.
 

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