问题
I am trying to remove or replace the DIV error with blank and i have tried to use the ISERROR function but still does not work. This is what it looks like my data:
COLA COLB COLC
ROW1 $0 $0 #DIV/0
ROW2 #VALUE!
so i get these kind of errors when i have something like above and i would like to replace with blanks. Here is my formula that does not work. thanks
=IF((ISERROR(D13-C13)/C13),"",(D13-C13)/C13)
回答1:
The suggestions are all valid. The reason why your original formula does not work is the wrong placement of the round brackets. Try
=IF(ISERROR((D13-C13)/C13),"",(D13-C13)/C13)
回答2:
A better formula that appears to suit your question is
=IFERROR((D13-C13)/C13,"")
Incidentally, it is less prone to errors as using mismatched formulas for the condition tested and the result on no-error (the present case can be regarded of this type).
If you want to stick to ISERROR
, then the solution by teylyn rules, of course.
回答3:
Why remove the error, and instead just don't divide by zero?
=IF(C13=0,"",(D13-C13)/C13)
回答4:
Give this a try:
=IF(C13=0,0,(D13-C13)/C13)
回答5:
Another approach is to leave the errors in the sheet and hide them. This is sometimes useful, for instance #NA
errors in a column of data when plotted on a chart show as missing rather than zero.
To hide them use conditional formatting, in the formula box
=ISERROR(C13)
and in the format box make the font colour white.
回答6:
Select the whole spreadsheet, then under menu Home - Conditional Formatting - New Rule... - Select Format only cells that contain - Under Format only cells with select Errors - Click Format... button - Go to the Font tab - Under Color select the same font color as the background (such as white).
来源:https://stackoverflow.com/questions/20484951/how-to-remove-div-0-errors-in-excel