Spacebar creates value error

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.
 
D

Dave Peterson

=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)="",....
 
R

Ragdyer

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)
 

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