I need to show inc/dec in inventory from month to month. If the previous month is zero and the new month has a pos or even negative amount (due to entry error), I need to show the increase or decrease, but keep getting #div error. Please help.
Debby
I need to show inc/dec in inventory from month to month. If the previous month is zero and the new month has a pos or even negative amount (due to entry error), I need to show the increase or decrease, but keep getting #div error. Please help.
Debby
You can't divide by 0 in mathematics - it's illegal... You need to trap the condition using an If function.
e.g
=IF(Previous Inventory>0,Do a normal calculation, Do something else)
Criteria to trap the error
Normal calculation
Alternative Calculation
In reality it looks something like : =IF(J7>0,(J8-J7)/J7,"0+" & J8)
where
J7 = Previous inventory
J8 = Current inventory
When it sees a zero inventory it displays the absolute increase in stock rather than the percentage
Last edited by AndyLitch; 07-12-2013 at 01:05 PM.
Elegant Simplicity............. Not Always
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks