View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Dave Benson Dave Benson is offline
external usenet poster
 
Posts: 6
Default How do I default blank cells to "0"?

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!

--
Dave Benson


"kristin" wrote:

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?