+ Reply to Thread
Results 1 to 3 of 3

Simple IF formula returning incorrect value

  1. #1
    Registered User
    Join Date
    06-24-2019
    Location
    Brisbane, Australia
    MS-Off Ver
    2016
    Posts
    2

    Arrow Simple IF formula returning incorrect value

    Hey all!

    First post here...

    I'm having a hard time trying to figure out why a simple IF formula is returning an incorrect value - it's providing the total opposite of what it should be.

    I've attached a picture of what I'm seeing and the formula - you should be able to see from that which value it should be pulling... The formula in the formula bar is in cell E1

    If I put this data in a brand new sheet, it returns the correct value. Starting a new sheet isn't an option, really either...

    Any ideas? I'm pulling my hair out!

    IF Error.JPG

    Thanks in advance!

  2. #2
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,914

    Re: Simple IF formula returning incorrect value

    I think there might be unnecessary spaces in B1 or D1 use below
    =If(TRIM(D1)=TRIM(B1),C2,C1)
    Samba

    Say thanks to those who have helped you by clicking Add Reputation star.

  3. #3
    Registered User
    Join Date
    06-24-2019
    Location
    Brisbane, Australia
    MS-Off Ver
    2016
    Posts
    2

    Re: Simple IF formula returning incorrect value

    Quote Originally Posted by samba_ravi View Post
    I think there might be unnecessary spaces in B1 or D1 use below
    =If(TRIM(D1)=TRIM(B1),C2,C1)
    You, sir, have just saved me so much time!

    ... and most likely my hairline. Thanks so much!

+ 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. Formula returning Incorrect data
    By IkeWelsh in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-21-2016, 12:35 PM
  2. Low decimals incorrect in simple formula
    By kretzen in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 11-05-2012, 09:18 AM
  3. [SOLVED] IF Formula Returning Incorrect Value
    By Sky188 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-18-2012, 04:42 PM
  4. [SOLVED] formula returning incorrect blanks
    By [email protected] in forum Excel General
    Replies: 7
    Last Post: 03-09-2006, 04:55 PM
  5. [SOLVED] formula returning incorrect blanks
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-09-2006, 03:35 PM
  6. Replies: 7
    Last Post: 03-09-2006, 03:20 PM
  7. [SOLVED] formula returning incorrect blanks
    By [email protected] in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 03-09-2006, 03:20 PM

Tags for this Thread

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