Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 318
Default if is error and #DIV/O!

Hello this is my original formula =(A1-B1)/A1. This is Ok except that
sometimes I get #DIV/0!. so I tried to fix the formula to this
=IF(ISERROR(A1-B1)/A1,"",(A1-B1)/A1).. What I'm I missing? thanks in
advance
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,345
Default if is error and #DIV/O!

You are missing a set of parenthesis

=IF(ISERROR((A1-B1)/A1),"",(A1-B1)/A1)




--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings


Replace @mailinator.com with @tiscali.co.uk


"Wanna Learn" wrote in message
...
Hello this is my original formula =(A1-B1)/A1. This is Ok except that
sometimes I get #DIV/0!. so I tried to fix the formula to this
=IF(ISERROR(A1-B1)/A1,"",(A1-B1)/A1).. What I'm I missing? thanks in
advance



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default if is error and #DIV/O!

Try this

=IF(A1<0,(A1-B1)/A1,"")

Mike

"Wanna Learn" wrote:

Hello this is my original formula =(A1-B1)/A1. This is Ok except that
sometimes I get #DIV/0!. so I tried to fix the formula to this
=IF(ISERROR(A1-B1)/A1,"",(A1-B1)/A1).. What I'm I missing? thanks in
advance

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,651
Default if is error and #DIV/O!

Firstly the parameter which you have supplied to ISERROR is (A1-B1), but I
guess that you aren't getting an error on the subtraction.
The error you are looking for is in the division, so the parameter for
ISERROR should be ((A1-B1)/A1), so the formula then becomes:
=IF(ISERROR((A1-B1)/A1),"",(A1-B1)/A1)

Secondly, with the use of ISERROR you might hide other errors which you
ought to investigate separately, so you would be better just trapping for
the specific #DIV/0! error, so why not use:
=IF(A1=0,"",(A1-B1)/A1)
--
David Biddulph

"Wanna Learn" wrote in message
...
Hello this is my original formula =(A1-B1)/A1. This is Ok except that
sometimes I get #DIV/0!. so I tried to fix the formula to this
=IF(ISERROR(A1-B1)/A1,"",(A1-B1)/A1).. What I'm I missing? thanks in
advance



  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 43
Default if is error and #DIV/O!

=IF(A1=0,"",IF(ISERROR(A1-B1)/A1,"",(A1-B1)/A1))
--
Regards.
Daniel
"Wanna Learn" a écrit dans le message
de news: ...
Hello this is my original formula =(A1-B1)/A1. This is Ok except that
sometimes I get #DIV/0!. so I tried to fix the formula to this
=IF(ISERROR(A1-B1)/A1,"",(A1-B1)/A1).. What I'm I missing? thanks in
advance



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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Visual Basic Error Run Time Error, Type Mismatch Meg Partridge Excel Discussion (Misc queries) 12 September 10th 08 06:10 PM
Error: "Excel encountered an error and had to remove some formatti Carl Excel Discussion (Misc queries) 0 September 18th 06 06:39 PM
Counting instances of found text (Excel error? Or user error?) S Davis Excel Worksheet Functions 5 September 12th 06 04:52 PM
Excel 2003 Macro Error - Runtime error 1004 Cow Excel Discussion (Misc queries) 2 June 7th 05 01:40 PM


All times are GMT +1. The time now is 10:59 AM.

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

About Us

"It's about Microsoft Excel"