G Guest Apr 26, 2005 #1 Can I use an IF function to ignore the #DIV/0 output when making a formula and if so how and if not what could I use?
Can I use an IF function to ignore the #DIV/0 output when making a formula and if so how and if not what could I use?
J JE McGimpsey Apr 26, 2005 #2 One way: Assuming your existing formula is =A1/B1 then use =IF(B1=0,"",A1/B1)
H Harlan Grove Apr 26, 2005 #5 DLZ217 said: Can I use an IF function to ignore the #DIV/0 output when making a formula and if so how and if not what could I use? Click to expand... You could trap #DIV/0! using =IF(COUNT(1/(ERROR.TYPE(expression)=2)),"ignore",expression) but it's generally better to trap the subexpression causing the error, e.g., to trap it in averages, =IF(COUNT(x),AVERAGE(x),"ignore") and to trap it in denominators, =IF(N(denominator)<>0,numerator/denominator,"ignore")
DLZ217 said: Can I use an IF function to ignore the #DIV/0 output when making a formula and if so how and if not what could I use? Click to expand... You could trap #DIV/0! using =IF(COUNT(1/(ERROR.TYPE(expression)=2)),"ignore",expression) but it's generally better to trap the subexpression causing the error, e.g., to trap it in averages, =IF(COUNT(x),AVERAGE(x),"ignore") and to trap it in denominators, =IF(N(denominator)<>0,numerator/denominator,"ignore")