How to remove #DIV/0 errors in excel

妖精的绣舞 提交于 2020-06-22 12:55:08

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!