+ Reply to Thread
Results 1 to 4 of 4

Acheive a a declining subtraction to 0 rather than a negative number

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    06-10-2014
    Location
    UK
    MS-Off Ver
    2010
    Posts
    272

    Acheive a a declining subtraction to 0 rather than a negative number

    Hi all,

    I'm not sure how to explain my problem, so I've attached a sample spreadsheet. I think that might be clearer than my explanation.

    What I'm trying to achieve is a declining subtraction to 0 rather than a negative number, as I've shown in row 25.
    Also in row 22 I would like the values to show 0 from the left until the last positive figure in row 25.
    In cell B21 I would like to show the figure carried over as shown in cell K22.


    Many thanks
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    10-09-2014
    Location
    Newcastle, England
    MS-Off Ver
    2003 & 2013
    Posts
    1,986

    Re: Acheive a a declining subtraction to 0 rather than a negative number

    theres probably a more elegant solution (involving MIN) but just wrap your calc in an IF statement

    =IF(A1 - B1 < 0,0,A1 - B1)
    If someone has helped you then please add to their Reputation

  3. #3
    Forum Contributor
    Join Date
    06-10-2014
    Location
    UK
    MS-Off Ver
    2010
    Posts
    272

    Re: Acheive a a declining subtraction to 0 rather than a negative number

    Thanks for the reply to the problem in row 25.
    It almost works , but it leaves the result 24 short, ie it subtracts 225 from the predicted production, it needs to do one more subtraction to reach 249. then the next cell onwards should show zero.

    Thanks

  4. #4
    Forum Expert
    Join Date
    10-09-2014
    Location
    Newcastle, England
    MS-Off Ver
    2003 & 2013
    Posts
    1,986

    Re: Acheive a a declining subtraction to 0 rather than a negative number

    my post though was just an example, you'd use whatever calculation you have currently in the cell (in place of the A1 - B1) but you're simply saying, if the answer is < 0 then make it zero otherwise give the answer to the calculation.

+ 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. Replies: 2
    Last Post: 03-05-2014, 01:19 PM
  2. [SOLVED] Help with subtraction while ignoring a negative value in a cell.
    By ravi008 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-21-2013, 03:38 PM
  3. [SOLVED] Iterate subtraction until just before it becomes negative
    By riehlncopower in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-05-2013, 05:39 PM
  4. Replies: 4
    Last Post: 03-04-2012, 12:21 PM
  5. [SOLVED] 2003= negative number&2004= negative number How Do I Calculate gro
    By Jason in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-14-2005, 02:06 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