+ Reply to Thread
Results 1 to 4 of 4

Inconsistent IF Results

  1. #1
    Registered User
    Join Date
    03-09-2007
    Posts
    10

    Inconsistent IF Results

    CELL A1 CONTAINS "4.030"
    CELL B1 CONTAINS "4.015"
    CELL C1 HAS THIS FORMULA =SUM(A1-B1).....IN THIS CASE THE SUM IS ".015"
    CELL D1 HAS THIS FORMULA =IF(C1>0.015,"FAIL","PASS"), BUT......
    IT RETURNS "FAIL", ANYTHING OVER OR UNDER THE EXACT NUMBER WORKS FINE, BUT THE EXACT NUMBER ISN'T ACTING RIGHT!
    ALSO, IF I REMOVE THE FORMULA FROM C1 & MANUALLY TYPE ".015" INTO THE CELL IT WORKS GREAT AS WELL.
    HELP ME!!!!!!
    please
    Last edited by DonkeyOte; 12-17-2010 at 03:53 AM.

  2. #2
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,966

    Re: =if.....issues!!

    Looks like a rounding error problem.

    Try

    =INT((A1-B1) * 1000)/1000

    instead.
    Martin

    If my solution has saved you time and/or money, please consider sponsoring my run in the 2020 London Marathon in aid of Cancer Research UK.

    https://uk.virginmoneygiving.com/MartinRice

  3. #3
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    21,529

    Re: =if.....issues!!

    @BW29, please note that your thread title falls foul of Forum Rules.

    Your post title should accurately and concisely describe your problem - in this case perhaps something along the lines of: "Inconsistent IF Results"
    (I appreciate in this instance it probably isn't obvious how to best describe given the Rounding issue is not obvious - on that basis I have on this occasion modified for you).

    Please also avoid posting in CAPS - this is in forum-geek terms interpreted as shouting.

    Regards solution - you can just round the result:

    Please Login or Register  to view this content.
    or, if you prefer to dispense with C1 altogether:

    Please Login or Register  to view this content.
    Note the use of SUM in SUM(A1-B1) is superfluous.

    Thanks

  4. #4
    Registered User
    Join Date
    03-09-2007
    Posts
    10

    Re: =if.....issues!!

    @DonkeyOte
    Thanks for the help, your first idea did the trick.
    Sorry about shouting at ya'll!!!

+ 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