+ Reply to Thread
Results 1 to 8 of 8

Need help with IF function where one of the condition is related to blank cells

  1. #1
    Registered User
    Join Date
    09-25-2024
    Location
    London
    MS-Off Ver
    365
    Posts
    3

    Need help with IF function where one of the condition is related to blank cells

    First timer here so please go easy on me. I have 2 columns. Column A has only True or False values whereas Column B has different dates and some cells are blanks.

    In column C, I want to add a Function which looks at column A first and if it is True in Column A then i want "YES" in column C and if False in column A then i want the formula to look at Column B for any cells that are "NOT BLANK" in which case it should return a YES in column C. If column A is false and column B is blank then i want "NO" in column C. I hope it makes sense.

    I have tried IFs with NOT and ISBLANK but cant seem to get it to work but i know Im not great at complicated IF functions so i must be missing something quite obvious somewhere.
    I have also tried =IF(AND(A2="FALSE",B2=""),"NO","YES") & =IF(OR(A2="TRUE",B2<>""),"Yes","No") but they both dont seem to give me the desired results.

    Im also attaching the data sample which shows what i need in column C for different scenarios and explained the reasoning in column D for your ease.


    Please let me know if you need any further details.

    Thanks.
    Attached Files Attached Files

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2411 (Windows 11 23H2 64-bit)
    Posts
    87,931

    Re: Need help with IF function where one of the condition is related to blank cells

    Welcome to the forum.

    Try this:

    =IF(AND(A2=FALSE,B2=""),"NO","YES")
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    09-25-2024
    Location
    London
    MS-Off Ver
    365
    Posts
    3

    Re: Need help with IF function where one of the condition is related to blank cells

    Thanks Ali, worked like a charm.

    Just one question - i tried the same formula earlier like i mentioned in my original post but i had "FALSE" in Quotation marks in my formula as my understanding was that you have to do this if referring to a TEXT. Was i wrong in thinking that?

  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,164

    Re: Need help with IF function where one of the condition is related to blank cells

    TRUE and FALSE are actual values in Excel, referred to as Boolean variables, and they do not need to be enclosed within quotes - if you do, then they are treated as text values.

    Hope this helps.

    Pete

  5. #5
    Registered User
    Join Date
    09-25-2024
    Location
    London
    MS-Off Ver
    365
    Posts
    3

    Re: Need help with IF function where one of the condition is related to blank cells

    Thanks Pete, really appreciate the quick response.

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2411 (Windows 11 23H2 64-bit)
    Posts
    87,931

    Re: Need help with IF function where one of the condition is related to blank cells

    Glad to have helped.

    If that takes care of your original question, please choose Thread Tools from the menu link above and mark this thread as SOLVED. You can also access the SOLVED tag by editing the opening post and choosing SOLVED from the drop-down to the left of the title box.

    Also, if you have not already done so, remember that you can reward anyone who offered you help towards a solution for your issue by clicking the small star icon (* Add Reputation) located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of each of those who offered help.

  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,164

    Re: Need help with IF function where one of the condition is related to blank cells

    Glad to help - thanks for the rep.

    Pete

  8. #8
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2411 (Windows 11 23H2 64-bit)
    Posts
    87,931

    Re: Need help with IF function where one of the condition is related to blank cells

    Administrative Note:

    We would very much like to help you with your query, however it has been brought to our attention that the same query has been posted on one or more other forums and you have not told us about this. You are required to do so. Cross-posts are allowed but you must provide a link to your posts on other sites.
    For new members: you will not be able to post a full URL, so remove the https://www. section and add one or two breaks to the rest of the address. A Moderator or Admin will then fix the link for you.

    Please see Forum Rule #7 about cross-posting and adjust accordingly. Read this to understand why we (and other sites like us) consider this to be important: https://excelguru.ca/a-message-to-forum-cross-posters/

    (Note: this requirement is not optional. As you are new here, I shall do it for you this time: https://forums.excelguru.ca/threads/...k-cells.11930/)

+ 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. Replies: 4
    Last Post: 02-24-2017, 02:39 AM
  2. [SOLVED] Need cells to remain blank until figures filled in the related cells
    By Philm1971 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 07-21-2015, 09:09 AM
  3. [SOLVED] Keeping particular cell blank if the related cells show "0" or "blank"
    By Anuru in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-24-2014, 05:30 AM
  4. [SOLVED] Keeping a cell blank if the related cells shows
    By Anuru in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 12-24-2014, 05:27 AM
  5. Replies: 4
    Last Post: 11-03-2014, 12:40 PM
  6. [SOLVED] Auto Fill from other columns and using IF with related to blank or Zero cells
    By Psionicrnd in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 01-05-2014, 05:45 AM
  7. [SOLVED] Keep cell blank if condition is false in IF function
    By ruthslaughter in forum Excel General
    Replies: 2
    Last Post: 11-23-2005, 09:20 AM

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