View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
joeu2004[_2_] joeu2004[_2_] is offline
external usenet poster
 
Posts: 829
Default error message "#VALUE!" due to blank cells

"Dorian74" wrote:
I am trying to have a spreadsheet where i check
the delivery time on orders (attached a picture).


For future reference, images that only duplicate what you describe in
English is usually useless.

What we need to know a formulas, cell values, etc.

But in this case, the problem is "obvious" -- or so it would seem.


"Dorian74" wrote:
Essentially, it calculates the difference between
the "Promised Date (A1)" and the "Atual Date (A2)"
i.e. A1-A2
The problem is where is have blank cells with no
information yet. then i get the nice error message
"#VALUE!"
Can anyone help in having these cells show nothing
instead of the error message?


That cells that __appear__ blank probably are not "empty" (no constant and
no formula).

Instead, probably (hopefully) their value is the null string ("").
Alternatively, their value might strings of spaces or non-breaking spaces
(HTML &nbsp).

In either case, the following should avoid the #VALUE error:

=IF(COUNT(A1,A2)<2,"",A1-A2)

formatted as General or Number to avoid a "negative date" error in the case
when "Actual" is later than "Promised".

Thus, the cell will __appear__ blank unless A1 and A2 have numeric values,
in this case Excel dates. In that case, the value is the null string ("").