If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > PC based Database Applications > Microsoft Excel > #DIV/0! Problem With Formula

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-11-09, 15:38
Rick Schreiber Rick Schreiber is offline
Registered User
 
Join Date: Mar 2004
Location: California
Posts: 400
#DIV/0! Problem With Formula

Formula is =(E38-B38)/B38 where E38 value is 0.

I did look this up on MS support and Googled it also but nothing on this particular formula applied.

And what if B38 valus is 0 as sometimes happens.

See the page where I use this formula a lot at RSMRlty.com/Market Activity and select either of the two Median Sale Price menu items.

Any ideas?

Thanks much.

Rick
Reply With Quote
  #2 (permalink)  
Old 04-13-09, 12:26
Colin Legg Colin Legg is offline
Registered User
 
Join Date: Sep 2008
Location: London, UK
Posts: 495
Hi,

What do you want to be displayed if B38 is equal to zero?

Usually we use an IF() worksheet function constuction like this:

=IF(B38,(E38-B38)/B38,0)

Change the 0 to whatever you want to be displayed instead of the error you are currently getting.

Hope that helps...
Reply With Quote
  #3 (permalink)  
Old 04-13-09, 22:27
Rick Schreiber Rick Schreiber is offline
Registered User
 
Join Date: Mar 2004
Location: California
Posts: 400
Colin - that worked great!.

Now - what if the #DIV/0! is E38 in stead of B-38?

Somehow it needs to be =IF(B38 OR E38,(E38-B38)/B38 or E38,0)

If you look at my MEDIAN page on my internet site you will see that the data is sometimes in the second set of values.

Gosh I hope I'm explaining this correctly.

Thanks much Colin.

Rick
Reply With Quote
  #4 (permalink)  
Old 04-14-09, 08:55
Colin Legg Colin Legg is offline
Registered User
 
Join Date: Sep 2008
Location: London, UK
Posts: 495
Hi Rick,

I think ideally you would want to amend the formula in E38 so it doesn't return a #DIV/0! error either. To do this you would use a similar IF() formula construction to the one already mentioned.



But, if you want an error to displayed in E38 then you could cater for it by using a formula like:

=IF(AND(B38<>0,ISNUMBER(E38)),(E38-B38)/B38,0)


Hope that helps...
Reply With Quote
  #5 (permalink)  
Old 04-14-09, 16:41
Rick Schreiber Rick Schreiber is offline
Registered User
 
Join Date: Mar 2004
Location: California
Posts: 400
DIV error

Colin - that did the trick. Excellent!

Thanks much.

Rick
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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