+ Reply to Thread
Results 1 to 2 of 2

Formula for percentage increase or decrease when one factor is zero

  1. #1
    Registered User
    Join Date
    06-24-2013
    Location
    Dallas, PA
    MS-Off Ver
    Excel 2003
    Posts
    3

    Formula for percentage increase or decrease when one factor is zero

    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

  2. #2
    Valued Forum Contributor
    Join Date
    03-29-2013
    Location
    United Kingdom
    MS-Off Ver
    Office/Excel 2013
    Posts
    1,749

    Re: Formula for percentage increase or decrease when one factor is zero

    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

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1