+ Reply to Thread
Results 1 to 10 of 10

Format dates in cells to change colour when expired or within 6 months of expiry

  1. #1
    Registered User
    Join Date
    06-06-2019
    Location
    Queensland, Australia
    MS-Off Ver
    MS Office 365
    Posts
    5

    Exclamation Format dates in cells to change colour when expired or within 6 months of expiry

    I have created a worksheet to track training records and requirements. So far, I have been unable to find a way to format the cells to change colour when training validity dates are expired or within 6 months of expiry;

    RED - Expired date
    ORANGE - Date within 6 months of expiry date

    This expiry date is based on the renewal date required for that individual column. Not all training has the same validity date range, so every training has its own timeframe referenced in row 3.

    I have done some basic VB coding to allow the grouping and filter features to be used when the sheet is protected. The workbook is attached with the password 123 to unlock.

    Thanks for having a look at this. I really appreciate it.

  2. #2
    Forum Expert kersplash's Avatar
    Join Date
    11-22-2016
    Location
    Perth
    MS-Off Ver
    Home 2016 (Windows 10)/Work 2013 Pro Plus (Windows 10)
    Posts
    2,012

    Re: Format dates in cells to change colour when expired or within 6 months of expiry

    Can you mock up what you want the formatting to look like for some of your data?

  3. #3
    Registered User
    Join Date
    06-06-2019
    Location
    Queensland, Australia
    MS-Off Ver
    MS Office 365
    Posts
    5

    Re: Format dates in cells to change colour when expired or within 6 months of expiry

    Attachment 627438

    Just the expired dates to turn bold red and the within 6 months expiry dates to turn bold orange. Thanks.
    Attached Images Attached Images

  4. #4
    Forum Expert kersplash's Avatar
    Join Date
    11-22-2016
    Location
    Perth
    MS-Off Ver
    Home 2016 (Windows 10)/Work 2013 Pro Plus (Windows 10)
    Posts
    2,012

    Re: Format dates in cells to change colour when expired or within 6 months of expiry

    Can you update your sample file rather than using an image?

  5. #5
    Registered User
    Join Date
    06-06-2019
    Location
    Queensland, Australia
    MS-Off Ver
    MS Office 365
    Posts
    5

    Re: Format dates in cells to change colour when expired or within 6 months of expiry

    OMG....I so should have done that! Please see the attached file.

    Thanks.

  6. #6
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,594

    Re: Format dates in cells to change colour when expired or within 6 months of expiry

    Hello K88DN and Welcome to Excel Forum.
    The following formulas used as conditional formatting rules seem to work.
    Red: =AND(Z8<>"",DATE(YEAR(Z8)+VALUE(LEFT(Z$3,1)),MONTH(Z8),DAY(Z8))< TODAY())
    Orange: =AND(Z8<>"",DATE(YEAR(Z8)+VALUE(LEFT(Z$3,1)),MONTH(Z8)-6,DAY(Z8))<=TODAY())
    Let us know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  7. #7
    Registered User
    Join Date
    06-06-2019
    Location
    Queensland, Australia
    MS-Off Ver
    MS Office 365
    Posts
    5

    Re: Format dates in cells to change colour when expired or within 6 months of expiry

    Hi JeteMc,
    Thanks for looking into this, I really appreciate it.
    I have had some issues applying these formulas on my end. The orange formula is 'taking over' and making both the red and orange formats orange.

    Attached is my mock workbook to show this. I'm not sure what I've done wrong.

    I do want this orange and red conditional formatting to cover;
    Columns Z - FZ
    Rows 8 - 200

    Cheers, K8BDN

  8. #8
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,594

    Re: Format dates in cells to change colour when expired or within 6 months of expiry

    The rule for red needs to precede the rule for orange in the rules manager.
    Let us know if you have any questions.

  9. #9
    Registered User
    Join Date
    06-06-2019
    Location
    Queensland, Australia
    MS-Off Ver
    MS Office 365
    Posts
    5

    Re: Format dates in cells to change colour when expired or within 6 months of expiry

    It worked! Thank you so much.

  10. #10
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,594

    Re: Format dates in cells to change colour when expired or within 6 months of expiry

    You're Welcome. Thank You for the feedback and for marking the thread as 'Solved'. I hope that you have a blessed day.

+ 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. Replies: 9
    Last Post: 04-17-2023, 12:16 AM
  2. Cell colour change for expiry from start date
    By cheese81 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 11-08-2018, 07:29 AM
  3. Automatic colour change of cells when reaching expiry dates
    By Adzfreight75 in forum Excel Formulas & Functions
    Replies: 17
    Last Post: 05-17-2017, 03:50 AM
  4. Complex log with expiry dates (certain box change colour ...)
    By tymonel in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-14-2015, 04:14 PM
  5. Change cell colour based on expiry dates
    By lb2013 in forum Excel General
    Replies: 9
    Last Post: 11-15-2013, 01:51 AM
  6. [SOLVED] Calculate expiry dates based on months
    By goldfield in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-06-2013, 06:46 PM
  7. Replies: 4
    Last Post: 12-01-2012, 09:37 AM

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