+ Reply to Thread
Results 1 to 11 of 11

Changing cell colour based on date

  1. #1
    Registered User
    Join Date
    10-10-2024
    Location
    Wiltshire, England
    MS-Off Ver
    365
    Posts
    5

    Changing cell colour based on date

    Hello! I'm so stuck with creating a training matrix! Please help me!

    It's a large spreadsheet all on one tab/page. There is a column down the left with staff names, a row at the top with all the modules to complete. Once completed, I enter the date that this module needs to be refreshed by the member of staff. What I want is the following...

    - When I enter a date into a cell I want that cell to turn green.
    - When there is one month or less until the date in the cell, I want the cell to turn orange (as a warning that the staff members module will need refreshing in less than a month.)
    - When the refresher date has arrived/passed, I want the cell to turn red, to let us know that this persons training has now expired.
    When there is no date in a cell and it is left blank, I want it to stay white.

    Is this even possible? I've managed to do the red one, but not the orange or green!

    PLEASE HELP ME IT'S DRIVING ME INSANE!!!

    Thank you so much, in advance!

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

    Re: Changing cell colour based on date

    Welcome to the forum.

    There are instructions at the top of the page explaining how to attach your sample workbook (yellow banner: HOW TO ATTACH YOUR SAMPLE WORKBOOK). Screenshots are of little practical use as we cannot manipulate them.

    A good sample workbook has just 10-20 rows of representative data that has been desensitised. The sample layout accurately matches that of your real data. It also has expected results mocked up, worked examples where required, relevant cells highlighted and a few explanatory notes.
    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
    Forum Expert
    Join Date
    07-23-2018
    Location
    UK
    MS-Off Ver
    O365 32bit (Windows)
    Posts
    2,924

    Re: Changing cell colour based on date

    Could use conditional formats
    Attached Images Attached Images

  4. #4
    Registered User
    Join Date
    10-10-2024
    Location
    Wiltshire, England
    MS-Off Ver
    365
    Posts
    5

    Re: Changing cell colour based on date

    Hello,

    Yes that's what I've been trying to do but I don't know how to use them. That's what I need help with really. Knowing exactly what to press and what to type to get the things mentioned above to occur automatically.

  5. #5
    Forum Expert
    Join Date
    07-23-2018
    Location
    UK
    MS-Off Ver
    O365 32bit (Windows)
    Posts
    2,924

    Re: Changing cell colour based on date

    What have you got so far; you said you had the red part working?

  6. #6
    Registered User
    Join Date
    10-10-2024
    Location
    Wiltshire, England
    MS-Off Ver
    365
    Posts
    5

    Re: Changing cell colour based on date

    Hello, so far I have got the following:

    For the red rule - Conditional Formatting - 'Format only cells that contain - Cell Value less than =TODAY() - and the colour selected as red.
    For the blank rule (so a cell with nothing entered into it remains white) - Conditional Formatting - Format only cells that contain - Blanks - and the colour selected as white.

    Then I have done the orange rule but it doesn't work as I want it to. I have gone to Conditional Formatting and then selected 'Format only cells that contain - Dates Occurring - Next month - and the colour selected as Orange. However, say it's the 1st October and the expiry date (date in the cell) is 8th October, it won't turn Orange as it's not 'next month'. It will only turn orange to dates in November. When what I want, is for it to turn Orange when there is less than a month until the expiry date.

    Then I really want the other cells to be green once a date is entered into them that has over a month left until it expires. So that it is easier to spot the blanks among the cells that have data entered that aren't less than a month until expiry or past expiry.

    Does that make sense?

  7. #7
    Forum Expert
    Join Date
    07-23-2018
    Location
    UK
    MS-Off Ver
    O365 32bit (Windows)
    Posts
    2,924

    Re: Changing cell colour based on date

    I've attached a file with the conditional formatting in place.
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    10-10-2024
    Location
    Wiltshire, England
    MS-Off Ver
    365
    Posts
    5

    Re: Changing cell colour based on date

    This is absolutely amazing! Thank you so much!

    Now, next question, do I have to change the formula for each cell (changing the I1,2,3 etc) one at a time, or is there a way that I can click a button and apply this formula to the whole spreadsheet?

    For context, I have 36 columns of modules along the top and around 50 rows of names down the side and I need these rules to apply to all of the cells, if that makes sense.

  9. #9
    Forum Expert
    Join Date
    07-23-2018
    Location
    UK
    MS-Off Ver
    O365 32bit (Windows)
    Posts
    2,924

    Re: Changing cell colour based on date

    Usually can do it by either selecting the cells before creating the format conditions, or copying a cell with the formatting and using paste special to paste only the formats.

  10. #10
    Registered User
    Join Date
    10-10-2024
    Location
    Wiltshire, England
    MS-Off Ver
    365
    Posts
    5

    Re: Changing cell colour based on date

    Hmm the orange one doesn't seem to work. On your spreadsheet the date in the orange one should be 14/11/2024 or sooner for it to be orange, yours is 17/11/2024.

  11. #11
    Forum Expert
    Join Date
    07-23-2018
    Location
    UK
    MS-Off Ver
    O365 32bit (Windows)
    Posts
    2,924

    Re: Changing cell colour based on date

    Maybe change the orange condition to
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files

+ 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. Bar changing colour based on cell value
    By Kevin Rush in forum Excel Charting & Pivots
    Replies: 10
    Last Post: 09-23-2021, 10:00 AM
  2. [SOLVED] Changing text colour in a cell based on value or colour of another cell.
    By Jeankartel in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 08-15-2019, 07:16 PM
  3. Changing Colour of Cell Based on a Date of Birth
    By spencer695 in forum Excel General
    Replies: 5
    Last Post: 04-09-2019, 02:53 PM
  4. Changing the colour of a tab based on a cell value
    By lauz125 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-30-2013, 04:15 AM
  5. Changing the colour of a cell based on the colour of another cell
    By Pete2931 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-11-2012, 03:35 AM
  6. Replies: 3
    Last Post: 07-14-2012, 02:36 PM
  7. Changing cell fill colour based on date in cell - Multiple rows
    By ExcelNewb2010 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-26-2010, 07:30 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