+ Reply to Thread
Results 1 to 6 of 6

Topping up a negative balance and then determing what to order

  1. #1
    Registered User
    Join Date
    01-29-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    3

    Topping up a negative balance and then determing what to order

    I have a simple spreadsheet that contains the numbers of parts in inventory, amount used in time period (in this case a year) and the remaining in inventory at the end of the year. In some cases the result is a positive number:

    example a:

    100 in inventory, 50 used with a result if 50 left at the end of the year

    A1 100
    A2 50
    A3 50

    A3 = A1-A2

    Now what if the value in A2 was 200

    A1 100
    A2 200
    A3 -100

    Since this is forecasting balances at the end of the year it is ok to be negative.

    How do I determine what I need to do to the value in A3 to make it 0 and then determine what to additionally add to meet the A2 number?

    so, A3 is -100, need to add 100, so it is 0 and then add the value of A2 (200). So the end result should be 300.

    can anyone help?

  2. #2
    Valued Forum Contributor
    Join Date
    02-08-2012
    Location
    Newcastle, Australia
    MS-Off Ver
    Excel 2007 and Excel 2010
    Posts
    1,429

    Re: Topping up a negative balance and then determing what to order

    Hi, try this formula in A3:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    If we look at the formula in its pieces, we get:

    If A1>=A2 (i.e. you didn't use as much as you had in inventory), then the formula remains as you have stated above (A1 - A2).
    But if A1<A2 (i.e. you used more than you had in inventory), then an alternate formula is used (A2 - A1 + A2). This formula will switch the order of the original subtraction (to ensure a positive number is the result), and then adds the amount that was used within the period.

    An alternate formula that would yield the same result is
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    This makes the difference A1 - A2 positive regardless of the sign (absolute value), and then adds the amount used only if it is larger than the amount in inventory.

    Both formulas will work, it is completely up to you which one you choose to use.

    Hope this helps you

  3. #3
    Registered User
    Join Date
    01-29-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Topping up a negative balance and then determing what to order

    [QUOTE=ajryan88;3360867]Hi, try this formula in A3:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    If we look at the formula in its pieces, we get:

    If A1>=A2 (i.e. you didn't use as much as you had in inventory), then the formula remains as you have stated above (A1 - A2).
    But if A1<A2 (i.e. you used more than you had in inventory), then an alternate formula is used (A2 - A1 + A2). This formula will switch the order of the original subtraction (to ensure a positive number is the result), and then adds the amount that was used within the period.

    An alternate formula that would yield the same result is
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    This makes the difference A1 - A2 positive regardless of the sign (absolute value), and then adds the amount used only if it is larger than the amount in inventory.

    Both formulas will work, it is completely up to you which one you choose to use.

    Hope this helps you [/QUOTE

    It seems to work for an overrun of the inventory - but not the reverse where you do not exceed the balance remaining. See below.

    formula ex.GIF

    any ideas??

  4. #4
    Valued Forum Contributor
    Join Date
    02-08-2012
    Location
    Newcastle, Australia
    MS-Off Ver
    Excel 2007 and Excel 2010
    Posts
    1,429

    Re: Topping up a negative balance and then determing what to order

    Sorry, I misunderstood what you were wanting. Use the first formula that I provided, but change it to:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Does this do what you want it to do?

    Sorry about the initial confusion...
    Last edited by ajryan88; 08-12-2013 at 01:16 AM.

  5. #5
    Registered User
    Join Date
    01-29-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Topping up a negative balance and then determing what to order

    perfect - thanks for the assist and I keep learning something new. Appreciate the help.

  6. #6
    Valued Forum Contributor
    Join Date
    02-08-2012
    Location
    Newcastle, Australia
    MS-Off Ver
    Excel 2007 and Excel 2010
    Posts
    1,429

    Re: Topping up a negative balance and then determing what to order

    No worries.

    Happy to help!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Sorting Postive and Negative numbers in order
    By pritesh118 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 07-22-2013, 07:51 AM
  2. Non-decimal arithmetic: old £ s d and a negative balance
    By jd_jd in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 07-19-2011, 01:51 PM
  3. determing how many fit
    By vedek73 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-06-2010, 04:47 PM
  4. [SOLVED] Time Accrual; Negative balance
    By lilsqueakyone in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-11-2005, 04:30 PM
  5. [SOLVED] how do I order a cel to be in red color if number is negative
    By DONPITO in forum Excel General
    Replies: 2
    Last Post: 09-05-2005, 06:05 PM

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