ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   How do I default blank cells to "0"? (https://www.excelbanter.com/excel-worksheet-functions/170673-how-do-i-default-blank-cells-0-a.html)

Kristin

How do I default blank cells to "0"?
 
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?

Bob Phillips

How do I default blank cells to "0"?
 
what's the formula?

--
---
HTH

Bob


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



"kristin" wrote in message
...
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?




T. Valko

How do I default blank cells to "0"?
 
Change your formula to account for blank cells. Post the formula and give us
an idea of what cells are blank.

--
Biff
Microsoft Excel MVP


"kristin" wrote in message
...
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?




Dave Benson

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?



All times are GMT +1. The time now is 09:10 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com