+ Reply to Thread
Results 1 to 5 of 5

Conditional Formatting with nested IFs

Hybrid View

  1. #1
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2502
    Posts
    26,846

    Re: Conditional Formatting with nested IFs

    You not have to use INDEX, just using the named range is sufficient.

    DATEDIF is undocumented, and though it can be useful for some things it doesn't add much if you just want the difference in days. A simple subtraction does the same thing.

    When you need to evaluate a condition such as for conditional formatting, you do not need to use IF to calculate a value. The condition itself will evaluate to TRUE or FALSE.

    So your formula can collapse down to this:

    =OR(D3="N/A",AND(D3="PMO Review",NOW()-CharterDraftDate>15),AND(D3="Executive Review",CharterExecutiveReviewDate-CharterDraftDate>15))
    It seems like a faithful implementation of the logic you specified so maybe there's a problem with either the logic, or you are not interpreting your data correctly.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  2. #2
    Registered User
    Join Date
    03-14-2011
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Conditional Formatting with nested IFs

    Thanks for your feedback, it deifinitely helps for the pointers you gave to simplify the formula, but unfortunately it did not work for me. I am attaching the file, as maybe I did not explain things well or am interpreting the data incorrectly as stated.

    One thing that was a little unclear is how do I use the same formula in subsequent cells without using INDEX. i.e. apply the same conditional formatting to check conditions of other cells in the same named range?

    Appreciate your input.
    Attached Files Attached Files

  3. #3
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2502
    Posts
    26,846

    Re: Conditional Formatting with nested IFs

    Quote Originally Posted by yousafkhan1976 View Post
    I am attaching the file, as maybe I did not explain things well or am interpreting the data incorrectly as stated.
    Looks OK to me, what test case is failing?

    One thing that was a little unclear is how do I use the same formula in subsequent cells without using INDEX. i.e. apply the same conditional formatting to check conditions of other cells in the same named range?
    This is why we always suggest attaching a file. From your description it wasn't evident that you needed to do this. The correct formula that will work in multiple rows would be
    =OR(D3="N/A",AND(D3="PMO Review",NOW()-INDEX(CharterDraftDate,ROW(),1)>15),AND(D3="Executive Review",INDEX(CharterExecutiveReviewDate,ROW(),1)-INDEX(CharterDraftDate,ROW(),1)>15))

+ 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