Zeros and #DIV/0!

J

JD

In a cell I have formula that uses data from other cells to calculate values.
Before data is entered into those cells I always see either zeros or #DIV/0!
on my spreadsheet. How do fix it so the cell with the formula is empty until
I enter corresponding data in the other cells?

thanks
 
J

Jim Thomlinson

#DIV/0 can be cleaned up by changing the formula to check for a zero
denominator.

=if(C2=0, "", B2/C2)

As for the zeros there are a couple of options. One is to not show any zero
values on the sheet by selecting Tools -> Options -> View tab and uncheck
Zero Values. The other option is to hide the zero's with condtional
formatting. Select the cell range and then Format -> Conditional Formatting
-> Cell Value is = 0 and format the text to be the same colour as the
background (usually white)...
 
F

Fred Smith

You do something like this:

=if(iserror(yourformula),"",yourformula)

Regards,
Fred.
 
J

Jim Thomlinson

Not to pick but IsError is kind of a dangerous formula to use in a case like
this. Any error and not just Div/0 will return a blank. If someone deletes a
cell, instead of getting a #ref telling you there is a problem, you get a
blank and no one knows there is a problem. While iserror is a handy formula
it should actually be used very sparingly. To that end I actually can not
remember the last time I used it and I spend a good part of my time creating
speadsheets...
 
G

Gord Dibben

Trap for the blank cells.

=IF(A1="","",B1/A1) or similar


Gord Dibben MS Excel MVP
 
J

JD

Thanks for the help,

I also posted the question on "AVERAGE WEEKLY MAXIMUMS" any ideas on that one?
 

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

Similar Threads

#DIV/0! error 1
#div/0 error 2
how to hide #DIV/0! 6
Conditional Formatting for #DIV/0! 6
Div/0 2
how to average a range of cells and ignore #div/0! answer 4
Find Average w/ #DIV/0! in Cell 5
#DIV/0! query 1

Top