![]() |
Div/0
I want to create an if statement that says if the result of another cell is
#DIV/0! then return the result 'price not available' otherwise then return the result of that cell |
Div/0
Assuming that cell is A2,
then in B2: =IF(ISERROR(A2),"not available",A2) -- Max Singapore http://savefile.com/projects/236895 xdemechanik --- "JonathanW" wrote: I want to create an if statement that says if the result of another cell is #DIV/0! then return the result 'price not available' otherwise then return the result of that cell |
Div/0
That will give "not available" for all types of error, not just Div/0, Max.
If you want to trap for Div/0 specifically, try =IF(AND(ISERROR(A2),ERROR.TYPE(A2)=2),"not available",A2) -- David Biddulph "Max" wrote in message ... Assuming that cell is A2, then in B2: =IF(ISERROR(A2),"not available",A2) "JonathanW" wrote: I want to create an if statement that says if the result of another cell is #DIV/0! then return the result 'price not available' otherwise then return the result of that cell |
Div/0
Don't you just need to test for the error type, not whether there is an
error? I.e., =IF(ERROR.TYPE(A2)=2,"not available,A2) ? Dave -- A hint to posters: Specific, detailed questions are more likely to be answered than questions that provide no detail about your problem. "David Biddulph" wrote: That will give "not available" for all types of error, not just Div/0, Max. If you want to trap for Div/0 specifically, try =IF(AND(ISERROR(A2),ERROR.TYPE(A2)=2),"not available",A2) -- David Biddulph "Max" wrote in message ... Assuming that cell is A2, then in B2: =IF(ISERROR(A2),"not available",A2) "JonathanW" wrote: I want to create an if statement that says if the result of another cell is #DIV/0! then return the result 'price not available' otherwise then return the result of that cell |
Div/0
Actually, =IF(ISERROR(ERROR.TYPE(A1)=2),"","error") works.
Dave -- A hint to posters: Specific, detailed questions are more likely to be answered than questions that provide no detail about your problem. "Dave F" wrote: Don't you just need to test for the error type, not whether there is an error? I.e., =IF(ERROR.TYPE(A2)=2,"not available,A2) ? Dave -- A hint to posters: Specific, detailed questions are more likely to be answered than questions that provide no detail about your problem. "David Biddulph" wrote: That will give "not available" for all types of error, not just Div/0, Max. If you want to trap for Div/0 specifically, try =IF(AND(ISERROR(A2),ERROR.TYPE(A2)=2),"not available",A2) -- David Biddulph "Max" wrote in message ... Assuming that cell is A2, then in B2: =IF(ISERROR(A2),"not available",A2) "JonathanW" wrote: I want to create an if statement that says if the result of another cell is #DIV/0! then return the result 'price not available' otherwise then return the result of that cell |
Div/0
If you want to trap for Div/0 specifically, try
=IF(AND(ISERROR(A2),ERROR.TYPE(A2)=2),"not available",A2) That will fail if there isn't a #DIV/0! error. If A2 = a number the result is #N/A: ERROR.TYPE(#N/A) Biff "David Biddulph" <groups [at] biddulph.org.uk wrote in message ... That will give "not available" for all types of error, not just Div/0, Max. If you want to trap for Div/0 specifically, try =IF(AND(ISERROR(A2),ERROR.TYPE(A2)=2),"not available",A2) -- David Biddulph "Max" wrote in message ... Assuming that cell is A2, then in B2: =IF(ISERROR(A2),"not available",A2) "JonathanW" wrote: I want to create an if statement that says if the result of another cell is #DIV/0! then return the result 'price not available' otherwise then return the result of that cell |
All times are GMT +1. The time now is 01:18 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com