+ Reply to Thread
Results 1 to 6 of 6

IF statement won't work if equals "FALSE"

  1. #1
    Registered User
    Join Date
    07-17-2009
    Location
    Key West, Florida
    MS-Off Ver
    Excel 2003
    Posts
    6

    IF statement won't work if equals "FALSE"

    I'm not sure what I'm doing wrong, I use IF statements all the time. I inserted a VBA (sorry if terminology is off) with a line of code that returns TRUE or FALSE if a cell has a formula. So now that my worksheet is telling me TRUE or FALSE for these cells, I want a simple =IF(A1="FALSE",B1,"").

    However, it's not returning anything. If I replace FALSE with a different word, then the formula works.

    Any ideas why I'm having this issue?

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: IF statement won't work if equals "FALSE"

    Try:
    =IF(A1=FALSE,B1,"")
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    07-17-2009
    Location
    Key West, Florida
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: IF statement won't work if equals "FALSE"

    Thank you very, much! Not sure why I didn't try that as well, but that solves my problem, much appreciated!

  4. #4
    Registered User
    Join Date
    11-12-2013
    Location
    Singapore
    MS-Off Ver
    Excel 2010
    Posts
    1

    Re: IF statement won't work if equals "FALSE"

    Quote Originally Posted by NBVC View Post
    Try:
    =IF(A1=FALSE,B1,"")
    Hi, I chance upon this and find this really interesting. May I ask about the reason behind this? i.e. why does removing the quotation result in the equation to be valid?

  5. #5
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: IF statement won't work if equals "FALSE"

    A TRUE/FALSE result from a formula like =OR(A1=1,A1=2) is called a BOOLEAN value.

    Putting quotes around "FALSE" makes it a TEXT string, not a logical boolean of False.

  6. #6
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,501

    Re: IF statement won't work if equals "FALSE"

    snores, because as the poster wrote in the original post there is a formula that returns true or false. When in quotes the formula is looking for the word "False" not the results of a formula which are false. If they typed FALSE into the cell then it would see "FALSE" and return that value. Instead when the formula is changed it is now looking for the results false to work.
    Hope that makes sense.
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam Capricci

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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