+ Reply to Thread
Results 1 to 7 of 7

Simple "IF/AND" Formula Error

  1. #1
    Registered User
    Join Date
    03-28-2023
    Location
    Pennsylvania
    MS-Off Ver
    Microsoft office 365 version 2301
    Posts
    9

    Simple "IF/AND" Formula Error

    I would greatly appreciate some help with this formula! It seems simple, but just doesn't work. I am comparing 2 cells - A2 and A3. Cell A2="FALSE" and cell A3="Built in OT"

    I am using the formula =IF(AND(A2="FALSE",A3="Built In OT"),"ERROR","OK")


    The formula should be returning a value of "ERROR" but it says "OK", which is not correct.



    What am I doing wrong?

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2505 Win 11
    Posts
    24,754

    Re: Simple "IF/AND" Formula Error

    Are there any leading or trailing spaces in either A2 or A3? That is the only thing I can think of without actually seeing the file. Read the yellow banner at the top of this page on how to attach your file.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Registered User
    Join Date
    03-28-2023
    Location
    Pennsylvania
    MS-Off Ver
    Microsoft office 365 version 2301
    Posts
    9

    Re: Simple "IF/AND" Formula Error

    Here is the file. I think I uploaded it correctly, but if not, I'll try again
    Attached Files Attached Files

  4. #4
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,426

    Re: Simple "IF/AND" Formula Error

    A2 could contain the text value "FALSE", or the Boolean value FALSE, so try it without the quotes around FALSE in your formula as we don't have a sample file to check this out on.

    Hope this helps.

    Pete

  5. #5
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,426

    Re: Simple "IF/AND" Formula Error

    I can see that you have attached a file, and my guess was correct - use this in cell A5:

    =IF(AND(A2=FALSE,A3="Built In OT"),"ERROR","OK")

    Hope this helps.

    Pete

  6. #6
    Registered User
    Join Date
    03-28-2023
    Location
    Pennsylvania
    MS-Off Ver
    Microsoft office 365 version 2301
    Posts
    9

    Re: Simple "IF/AND" Formula Error

    That fixed it! Thank you very much!

  7. #7
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,426

    Re: Simple "IF/AND" Formula Error

    Glad to help. If that takes care of your original question, please take a moment to select Thread Tools from the menu above and to the right of your first post in this thread, and mark the thread as SOLVED.

    Also, since you are relatively new to the forum, you might like to know that you can directly thank those who have helped you by clicking on the small "star" icon located in the lower left corner of a post that you have found to be helpful (not just in this thread - for any post that has helped you). This also adds to the reputation of the poster (the small green bars in the poster's profile).

    Pete

+ 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] Google Sheets Error in formula - =IF(SEARCH(B$1, $A2),"Yes","No")
    By Ian99099 in forum For Other Platforms(Mac, Google Docs, Mobile OS etc)
    Replies: 1
    Last Post: 03-31-2021, 07:18 AM
  2. Replies: 8
    Last Post: 01-17-2021, 01:05 AM
  3. Replies: 3
    Last Post: 11-19-2020, 08:30 PM
  4. Replies: 11
    Last Post: 12-19-2019, 04:46 PM
  5. Replies: 35
    Last Post: 01-13-2016, 02:16 AM
  6. Error handling with "out of range" error, need it for a simple code
    By T12ISC in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-05-2014, 09:43 AM
  7. [SOLVED] How to Count number of "Error" and "OK" after the word "Instrument" found in table row
    By eltonlaw in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-17-2012, 06:26 AM

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