#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 18
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.misc
Max Max is offline
external usenet poster
 
Posts: 9,221
Default 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

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,651
Default 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



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,574
Default 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




  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,574
Default 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






  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default 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





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 04:26 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"