Spacebar creates value error

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

A3 is the sum total of A1 plus A2
If I clear either A1 or A2 with the spacebar I get a value error. I know I
can "clear the contents" or enter zero but is there another way around this
because using the spacebar is better for us.
 
=sum(a1:a2)

But I've never seen using the spacebar work better than clearing the cell (using
the delete key on the keyboard).

I find that writing formulas like this a real pain.
=if(a1=" ", ...
and if the user hit the spacebar twice (or more)
=if(a1=" ",...

And to add =trim() around every reference can be a pain, too:
=if(trim(a1)="",....
 
You are definitely not doing this the right way, since you don't know which
cells are truly empty or just blank.

BUT ... you might try the SUM() function, which ignores your keystroke:

=Sum(A1:A2)
 
Back
Top