Excel - The dreaded DIV/0 Error!!

Ok this is I am trying to do.... (simple version)

I am pulling market information via web API to a table which contains the following basic columns

A - Asset name B - Asset ID C- Min Sell Price (location A) D- Volume E- Blank F- Min Sell Price (Location B) G - Volume H - Blank I - Net Diff C/F(%)

Using =(D17-G17)/ABS(D17) If there is a 0 in either volume columns it returns either -100% or +100% Which I do not want because I pull high or low % gains to another page to highlight interesting markets.

So I add the following *IF(G17=0,,1)  This works fine if one of the volume columns shows a 0.

The issue of the dreaded div/0 error comes if BOTH of the volume columns are empty.  I have tried lots of different suggestions, In fact I can also do this to get the desired result - =(F76-C76)/ABS(C76)*IF(G76=D76,I76,"")  But then that breaks the first one and gives me a value error and with 50,000+ market lookups I really don't want to have to manually go through each line and amend accordingly every time it updates.

Frankly I am about to poke my eyes out with a sharp stick and take up the cloth to avoid ever having to look at a spreadsheet again... unless some kind soul can be of help :)



July 30th, 2015 11:34am

You can use

=IF(OR(D17=0,G17=0), whatever you want to return if either D17 or G17 is zero, (D17-G17)/ABS

Free Windows Admin Tool Kit Click here and download it now
July 30th, 2015 12:20pm

Awesome! Thanks for the correct and prompt response! eyes, cat and general sanity are saved for another day!
July 30th, 2015 6:18pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics