+ Reply to Thread
Results 1 to 6 of 6

Want IF statement to produce 0 if the formula result is negative

  1. #1
    Registered User
    Join Date
    03-01-2012
    Location
    edison, nj
    MS-Off Ver
    Excel 2010
    Posts
    5

    Want IF statement to produce 0 if the formula result is negative

    Straightforward IF statement. If the math result is negative I want a '0' to be returned instead of the negative value. How can this easily be done? Thanks in advance!

    =IF(C8+C9-C11>C12,C12,C8+C9-C11)

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,638

    Re: Want IF statement to produce 0 if the formula result is negative

    Maybe
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,120

    Re: Want IF statement to produce 0 if the formula result is negative

    how about
    =IF(SIGN(C8+C9-C11)=-1,0,IF(C8+C9-C11>C12,C12,C8+C9-C11))

  4. #4
    Registered User
    Join Date
    03-01-2012
    Location
    edison, nj
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Want IF statement to produce 0 if the formula result is negative

    That did the trick! Thanks for taking the time to help out. Appreciated....

  5. #5
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,120

    Re: Want IF statement to produce 0 if the formula result is negative

    Not sure who you're talking to, but glad we could help & thanks for the feedback

  6. #6
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,638

    Re: Want IF statement to produce 0 if the formula result is negative

    Ditto



    If you are satisfied with the solution(s) provided, please mark your thread as Solved.


    New quick method:
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

    Or you can use this way:

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save


    You may also want to consider thanking those people who helped you by clicking on the little star at the bottom left of their reply to your question.

+ 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. [SOLVED] Produce An Array Result On A Conditional Statement?
    By Dal123 in forum Excel General
    Replies: 3
    Last Post: 05-30-2018, 03:15 PM
  2. [SOLVED] produce text result instead of #NUM! result in array formula
    By Stuartzz in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-29-2018, 08:17 PM
  3. Formula to produce result based if part of text in one cell matches another
    By @MeDaveT in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-30-2015, 10:11 AM
  4. [SOLVED] If Formula To Produce Word Result
    By Gtrtim112 in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 02-16-2015, 10:30 PM
  5. [SOLVED] Help with formula to search 2 cells and produce a result
    By champion777 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-02-2012, 07:11 PM
  6. Replies: 3
    Last Post: 07-02-2012, 06:02 AM
  7. Macro formula to match two columns and Produce result in fourth column.
    By rishi1983 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-03-2012, 08:50 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