+ Reply to Thread
Results 1 to 4 of 4

Help with subtraction while ignoring a negative value in a cell.

  1. #1
    Registered User
    Join Date
    03-18-2013
    Location
    surrey, england
    MS-Off Ver
    Excel 2007
    Posts
    2

    Question Help with subtraction while ignoring a negative value in a cell.

    Hello all, first time i am posting something so please ignore any mistakes. Anyway i am stuck what i would like to get done is:

    In column E i would like the result from the columns A, B, C and D respectively.
    Column B has an amount which is derived from adding sums of previous E and next A.
    The amount in Column C and D could be negative or positive or blank.
    Now basically to get the result in E i would like to subtract C and D from B, but the condition is if either C or D are negative or blank then they should be ignored.
    This is how my spreadsheet looks right now.

    EXCEL SNAP1.jpg


    Don't know if it can be done but any help would be greatly appreciated. Thanks

  2. #2
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,156

    Re: Help with subtraction while ignoring a negative value in a cell.

    hi ravi008, welcome to the forum. assuming your data in A2:D6, try this in E2:
    =B2-SUMIF(C2:D2,">0")

    to get better help next time, attach a sample workbook. Make sure there is just enough data to make it clear what is needed. Include BEFORE/AFTER sheets if needed to show the process you're trying to complete or automate. Remember to desensitize the data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  3. #3
    Registered User
    Join Date
    03-18-2013
    Location
    surrey, england
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Help with subtraction while ignoring a negative value in a cell.

    Hi Benishiryo thank you very much for your reply it solved my problem.
    Last edited by ravi008; 03-21-2013 at 06:24 PM.

  4. #4
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,610

    Re: Help with subtraction while ignoring a negative value in a cell.

    Attach a sample workbook. Make sure there is just enough data to make it clear what is needed. Include BEFORE/AFTER sheets if needed to show the process you're trying to complete or automate. Remember to desensitize the data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic

+ 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