+ Reply to Thread
Results 1 to 4 of 4

Advice appreciated: Conditional formatting based on dates combined with an IF query

  1. #1
    Registered User
    Join Date
    12-08-2021
    Location
    London, England
    MS-Off Ver
    10
    Posts
    2

    Advice appreciated: Conditional formatting based on dates combined with an IF query

    Hi - so, as you can hopefully see from the attached, I want to be able to mark projects "Red", "Amber" and "Green" in column H, depending on whether they're ahead of time, on time or past a given deadline (Columns E and F).

    To complicate matters, I also want to be able to mark those projects as "Green" if the project status (column D) is marked as completed.

    I think I'm sort of halfway there with the formula:

    =IF(E3>=TODAY(),"G",IF(F3>=TODAY(),"A","R"))

    But what I haven't been able to work out is how to change that text value "G", "A" or "R" into a fill colour.

    Nor have I been able to work out how to link that final fill colour in column H to the status of the project (column D).

    Any excel experts out there able to provide me with guidance? Much appreciated if so.
    Attached Files Attached Files

  2. #2
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.84 (24041420))
    Posts
    8,751

    Re: Advice appreciated: Conditional formatting based on dates combined with an IF query

    you an setup three rules in conditional formatting

    for 2007, 2010 , 2013 , 2016 , 2019 or 365 Subscription excel version
    Conditional Formatting

    Highlight applicable range >>
    H3:H100 - extend the rows to meet your data range of rows

    Home Tab >> Styles >> Conditional Formatting
    New Rule >> Use a formula to determine which cells to format
    Edit the Rule Description: Format values where this formula is true:
    =H3="G"

    Format [Number, Font, Border, Fill] Format Green
    choose the format you would like to apply when the condition is true
    OK >> OK

    Repeat for the other codes

    with the completed = add that as a Nested IF

    =IF(D3="completed", "G", IF(E3 > = TODAY(),"G",IF(F3 > = TODAY(),"A","R")))

    Now we should be able to combine the G with an OR

    I have not checked formula, are you happy with the formula IF(E3>=TODAY(),"G",IF(F3>=TODAY(),"A","R")) and provides the correct code for the dates only need to add the exception for completed status to be G

    IF(OR( D3 = "completed", E3>=TODAY()),"G",IF(F3>=TODAY(),"A","R"))
    Attached Files Attached Files
    Last edited by etaf; 12-08-2021 at 02:33 PM.
    Wayne
    if my assistance has helped, and only if you wish to , there is an "* Add Reputation" on the left hand side - you can add to my reputation here

    If you have a solution to your thread - Please mark your thread solved do the following: >
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  3. #3
    Registered User
    Join Date
    12-08-2021
    Location
    London, England
    MS-Off Ver
    10
    Posts
    2

    Re: Advice appreciated: Conditional formatting based on dates combined with an IF query

    Amazing - spot on. Thank you so much.

  4. #4
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.84 (24041420))
    Posts
    8,751

    Re: Advice appreciated: Conditional formatting based on dates combined with an IF query

    you are welcome

+ 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. Conditional Formatting based on dates in cells query
    By DrOC10 in forum Excel Formulas & Functions
    Replies: 14
    Last Post: 06-29-2020, 07:19 AM
  2. [SOLVED] Conditional Formatting based on given dates
    By fizzwolf in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-08-2017, 12:20 PM
  3. Conditional Formatting based on due dates
    By unlvjeffro in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-14-2016, 09:13 PM
  4. Conditional Formatting based on dates (2)
    By rz6657 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-05-2013, 03:17 PM
  5. Replies: 2
    Last Post: 10-04-2011, 09:50 AM
  6. IF Statement: Any advice would be appreciated.
    By tstangle in forum Excel General
    Replies: 1
    Last Post: 02-18-2011, 05:38 PM
  7. Combined dates formatting
    By Machvayne in forum Excel General
    Replies: 2
    Last Post: 02-03-2010, 08:54 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