ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   #VALUE! Error (https://www.excelbanter.com/excel-discussion-misc-queries/225464-value-error.html)

bgcooker

#VALUE! Error
 
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?

Bernard Liengme[_3_]

#VALUE! Error
 
=if(ISERROR(E8/C8),"",E8/C8)
or
=IF(COUNT(E8,C8)=2,E8/C8,"")
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"bgcooker" wrote in message
...
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?




Stefi

#VALUE! Error
 
Maybe
=IF(ISERROR(E8/C8),"",E8/C8)

Regards,
Stefi

€˛bgcooker€¯ ezt Ć*rta:

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?


MyVeryOwnSelf[_2_]

#VALUE! Error
 
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.


All times are GMT +1. The time now is 01:47 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com