+ Reply to Thread
Results 1 to 4 of 4

Trying to make sense of a complicated nested 'If" formula in conditional formatting

  1. #1
    Registered User
    Join Date
    04-07-2020
    Location
    Canada
    MS-Off Ver
    2013
    Posts
    2

    Trying to make sense of a complicated nested 'If" formula in conditional formatting

    The formula looks like this
    =IF($G4 <= K$2, IF($H4 >= K$2, "Y", ""), "")="Y"

    I cannot for the life of me figure out why the last ="Y" is needed. It's driving me crazy! '

    Help please!

  2. #2
    Valued Forum Contributor
    Join Date
    06-22-2018
    Location
    Blackpool, England
    MS-Off Ver
    2019
    Posts
    408

    Re: Trying to make sense of a complicated nested 'If" formula in conditional formatting

    It's a formula in conditional formatting... it's got to return TRUE, or FALSE. It means "if the result of this nested if-formula..."
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    "... equals "Y", then apply the conditional format.

    Tim
    Never stop learning!
    <--- please consider *-ing !

  3. #3
    Registered User
    Join Date
    04-07-2020
    Location
    Canada
    MS-Off Ver
    2013
    Posts
    2

    Re: Trying to make sense of a complicated nested 'If" formula in conditional formatting

    Brilliant. Thank you. I used an 'And' function which served the same purpose and was a lot less complicated.
    =AND($G4 <= K$2, $H4 >= K$2). It worked without adding the extra =Y at the end. I get that And will return a true value when both conditions are met.
    wouldn't the nested if also return a Y value?

  4. #4
    Valued Forum Contributor
    Join Date
    06-22-2018
    Location
    Blackpool, England
    MS-Off Ver
    2019
    Posts
    408

    Re: Trying to make sense of a complicated nested 'If" formula in conditional formatting

    Only if G4 is smaller or equal to K2 *and* H4 is greater or equal to K2, which is what your alternative does. Both are equivalent.

    Tim

+ 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] Conditional Formatting (Colors) in a "Nested If" Situation
    By ikslohap in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-17-2014, 11:28 AM
  2. How to make conditional formatting "DO NOTHING"?
    By fireboy148 in forum Excel General
    Replies: 8
    Last Post: 06-17-2013, 12:30 AM
  3. Replies: 2
    Last Post: 11-28-2012, 03:36 PM
  4. Replies: 3
    Last Post: 05-25-2012, 08:52 PM
  5. Replies: 4
    Last Post: 01-21-2010, 01:22 PM
  6. Replies: 7
    Last Post: 07-30-2008, 12:45 PM
  7. [SOLVED] Need to make a "range" in conditional formatting.
    By DocMartigan in forum Excel General
    Replies: 3
    Last Post: 10-07-2005, 12:05 AM
  8. [SOLVED] Complicated conditional "countif" formula
    By bruch04 in forum Excel General
    Replies: 9
    Last Post: 08-17-2005, 05:05 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