How do I default blank cells to "0"?

K

kristin

In an Excel spreadsheet I have created a formula which includes blank cells,
which gives me an error. If I change the blank cells to "0" than the formula
is accepted. The spreadsheet is large and would be very time consuming to go
through and add a zero to each blank cell. Is there a way to change the cells
automatically?
 
B

Bob Phillips

what's the formula?

--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
T

T. Valko

Change your formula to account for blank cells. Post the formula and give us
an idea of what cells are blank.
 
D

Dave Benson

Try trapping the error with an IF function. For example, if you want to
multiply A1 by B1, the simple equation would be simply "=A1 * B1". To
replace the blanks with "0", try this "IF(A1 = "", 0 * B1, A1 * B1). Of
course your equation is probably more complex and I'm assuming you have
occasional blanks in only one column (Column A in my simplistic example).

The best bet is to prevent the error at the input level. Use data
validation on the original source data table forcing anyone entering new data
to give you a number or else they suffer scorn and ridicule in the form of an
error statement from their terminal screen. I hate it when my machine yells
at me!
 

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