+ Reply to Thread
Results 1 to 6 of 6

Countdown date colour change conditional formatting

  1. #1
    Registered User
    Join Date
    07-09-2019
    Location
    UK
    MS-Off Ver
    365
    Posts
    30

    Countdown date colour change conditional formatting

    Hi all,

    I'm trying to conditional format a cell with a date in to change colour the closer it gets to the deadline from todays date.
    For example, I have 2 weeks to go before a deadline - cell colour green.
    1 week to go - cell colour yellow
    3 days to go - cell colour orange
    1 day to go - cell colour red
    etc.

    Any help would be appreciated.
    Thanks,

    Paul.

  2. #2
    Forum Expert
    Join Date
    03-20-2015
    Location
    Primarily UK, sometimes NL
    MS-Off Ver
    Work: Office 365 / Home: Office 2010
    Posts
    2,405

    Re: Countdown date colour change conditional formatting

    Edit: ignore the formulae here - see later post for better solution


    1. Select your range (the range you want to format).
    2. On the Home tab of the ribbon, click 'Conditional Formatting', then 'New Rule', then 'Use a formula to determine which cells to format'.
    3. In the formula box, enter this:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Replace A2 with the top-left cell of your range.

    4. Click 'Format' then choose green fill.

    5. Repeat steps 3 & 4 with this formula and yellow fill:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    6. Repeat again with this and orange fill:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    7. Finally repeat with this formula and red fill:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Doing them in this order will ensure that Excel first checks for the fortnight, then for the week, then 3 days then 1 day and colours the cells appropriately.

    Hope that does what you want.
    Last edited by Aardigspook; 08-13-2021 at 05:06 AM. Reason: Refer to better later post
    Regards,
    Aardigspook

    I recently started a new job so am a bit busy and may not reply quickly. Sorry - it's not personal - I will reply eventually.
    If your problem is solved, please go to 'Thread Tools' above your first post and 'Mark this Thread as Solved'.
    If you use commas as your decimal separator (1,23 instead of 1.23) then please replace commas with semi-colons in your formulae.
    You don't need to give me rep if I helped, but a thank-you is nice.

  3. #3
    Registered User
    Join Date
    07-09-2019
    Location
    UK
    MS-Off Ver
    365
    Posts
    30

    Re: Countdown date colour change conditional formatting

    Thanks for the reply.
    I can't get that to work properly, it seems there's a conflict.
    I think it defaults to the lowest number and stays that colour.
    Ended up with =(A2-TODAY())>7 etc. that seemed to work to a point but it looks as though you can have only 3 rules running with conditional formatting?
    At least I think so as it doesn't work with a 4 date countdown.

  4. #4
    Forum Expert
    Join Date
    03-20-2015
    Location
    Primarily UK, sometimes NL
    MS-Off Ver
    Work: Office 365 / Home: Office 2010
    Posts
    2,405

    Re: Countdown date colour change conditional formatting

    Sorry, that's what comes of typing something while trying to do something else at the same time and not actually checking that it works.

    Here are better rules for green, yellow, orange, red fills:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Attached is a file showing it working.

    As long as you're running Excel 2007 or later, you can have a lot more than 3 CF rules (2003 and earlier versions were limited to 3).

    Again, sorry for the previous incorrect rules and I hope that this now does what you want.

  5. #5
    Registered User
    Join Date
    07-09-2019
    Location
    UK
    MS-Off Ver
    365
    Posts
    30

    Re: Countdown date colour change conditional formatting

    Spot on. Works great!
    Thanks for the help

  6. #6
    Forum Expert
    Join Date
    03-20-2015
    Location
    Primarily UK, sometimes NL
    MS-Off Ver
    Work: Office 365 / Home: Office 2010
    Posts
    2,405

    Re: Countdown date colour change conditional formatting

    You're welcome, glad I could help (at the second attempt ).
    If that takes care of your original question, then please take a moment to mark the thread as Solved so others know there's an answer here (instructions are in my sig (in my first post)). Thanks.

+ 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 HELP to identify specific text, change cell colour & remove date.
    By Redders21 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 02-25-2020, 12:15 PM
  2. [SOLVED] Conditional formatting to change cell colour based on date in another cell
    By Matt279139 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 12-02-2019, 08:51 AM
  3. conditional formatting only change colour when date input
    By TRAZ6666 in forum Excel Formulas & Functions
    Replies: 19
    Last Post: 08-08-2018, 05:56 AM
  4. Replies: 6
    Last Post: 04-11-2016, 09:48 AM
  5. Replies: 1
    Last Post: 11-21-2013, 01:16 PM
  6. [SOLVED] Conditional Formatting to Change Cell Colour Based on Date
    By Kym2101 in forum Excel General
    Replies: 5
    Last Post: 05-01-2012, 11:41 PM
  7. Change colour in a cell - conditional formatting?
    By ionistis in forum Excel General
    Replies: 9
    Last Post: 12-04-2008, 03:38 PM

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