This is a discussion on getting rid of #DIV/o! within the Excel Questions forums, part of the Question Forums category; Is there a way to get rid of that #DIV/0! error? I have a workbook I use as a template ...
Is there a way to get rid of that #DIV/0! error? I have a workbook I use as a template for different projects, and it starts out blank each time. If I don't use a certain row in a certain project, then I have a column which reads #div/0!
Example: =sum(g13/c13) c13=0, but a number will be filled in later.
Why are you summing a single value?Originally Posted by Randi_M
What do you mean?
Your formula quoted was:
G13/C13 is a number so there is no need for the SUM().
I think this will give you the desired...
Put the following in the corresponding cell reference (only the blue text):
A1 - 0
B1 - 1000
C1 - =IF(ISERROR(B1/A1),"N/A",B1/A1)
The "N/A" ref in the C1 formula will display a N/A for each #DIV/0! error message... If you wish it to say something different (text wise), type whatever you wish between the quotes in the formula... If you wish the cell to display nothing, just remove the N/A from the formula but LEAVE the quotes... The quotes must be left to display nothing (i.e =IF(ISERROR(B1/A1),"",B1/A1))... Also note if you wish a numeric value to be displayed or another formula to occur in the event this eror message happens, you must type that value/formula in the area of the formula that reads "N/A" (i.e =IF(ISERROR(B1/A1),sum(A1:B1),B1/A1))(yes, remove the quotes in this case - quotes are only used to denote that a text field will be placed in the cell)... Good Luck.
Thanks, that works perfectly!!!
Your use of ISERROR is like swatting flies with a sledgehammer. See Aladin's recommendation above for a more "surgical" approach.Originally Posted by ddubnansky