M
[Mr.] Lynn Kurtz
Suppose cell A1 is empty, B1 has =isblank(A1), and C1 has
=countblank(A1).
Then B1 evaluates to true and C1 evaluates to 1. OK so far.
Now change A1 to the formula = "", the empty string. Now B1 shows
false but C1 shows true. This seems a bit inconsistent.
Now put a 3 in A2 and set A3 = A1 + A2. This gives a #value error when
A1 has the empty string. But if you change A3 to = sum(A1:A2) it
treats the empty string as a zero and gives A3 evaluating to 3, an
inconsistency between the sum function and explicit addition.
If you delete the contents of A1 with the delete key so the cell is
actually empty, everything becomes consistent. Apparently a blank cell
and an empty cell aren't the same thing and aren't treated the same.
So in a sqreadsheet I might have a cell with a formula like this:
=if(qty > 0, qty*cost, "")
to display blanks instead of meaningless zeroes for things that aren't
ordered. But to avoid the #value error in a formula that references
this cell, instead of having the empty string in that if statement I
wonder how to get something with this effect:
=if(qty > 0, qty*cost, set cell empty as if the del key had been
pressed)
Comments anyone?
--Lynn
=countblank(A1).
Then B1 evaluates to true and C1 evaluates to 1. OK so far.
Now change A1 to the formula = "", the empty string. Now B1 shows
false but C1 shows true. This seems a bit inconsistent.
Now put a 3 in A2 and set A3 = A1 + A2. This gives a #value error when
A1 has the empty string. But if you change A3 to = sum(A1:A2) it
treats the empty string as a zero and gives A3 evaluating to 3, an
inconsistency between the sum function and explicit addition.
If you delete the contents of A1 with the delete key so the cell is
actually empty, everything becomes consistent. Apparently a blank cell
and an empty cell aren't the same thing and aren't treated the same.
So in a sqreadsheet I might have a cell with a formula like this:
=if(qty > 0, qty*cost, "")
to display blanks instead of meaningless zeroes for things that aren't
ordered. But to avoid the #value error in a formula that references
this cell, instead of having the empty string in that if statement I
wonder how to get something with this effect:
=if(qty > 0, qty*cost, set cell empty as if the del key had been
pressed)
Comments anyone?
--Lynn