Conditional Formatting regarding expiry dates

Nicola Eades 0 Reputation points
2024-01-18T17:14:27.11+00:00

Hello All :) I am working on a training matrix for all our employees in Excel. I would like to use some conditional formatting on all the dates. For example, I would like to highlight expiry dates within the next three months And highlight expired dates in red And maybe dates that have been expired for 6 months in yellow Any advice would be appreciated... Thanks!

Excel
Excel
A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
1,955 questions
{count} votes

3 answers

Sort by: Most helpful
  1. Jiajing Hua-MFST 10,565 Reputation points Microsoft Vendor
    2024-01-19T02:13:07.67+00:00

    Hi @Nicola Eades

    Could you please share us with a simple sample?

    On my simple sample, I divide date comparison into 4 situations.

    User's image

    You may try following steps:

    Select the cells that you need to apply conditional formatting > click Home tab > Conditional Formatting > New Rule > Use a formula to determine which cells to format.

    Red: =IF(TODAY()>$B2,1,0)

    Green: =IF((AND(TODAY()<=$B2,EDATE(TODAY(),3)>$B2)),1,0)

    Yellow: =IF((AND(EDATE(TODAY(),3)<=$B2,EDATE(TODAY(),6)>$B2)),1,0)

    User's image


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


    0 comments No comments

  2. Nicola Eades 0 Reputation points
    2024-01-19T10:00:38.3466667+00:00

    Hi! Thank you So here is an example - obviously the word "expires" is going to be removed - but this is just an example so you can see what I'm trying to achieve... User's image

    Hope that helps explain things a bit better...! Any questions, just ask - and thanks so much for your time so far...!


  3. Karthick G 0 Reputation points
    2024-01-24T17:38:05.05+00:00

    This can be achieved by using helper cells. First you have to remove the Expires from the range. I have used 3 helper cells K1, L1 and M1. where K1 formula is =TODAY() L1 formula is =EDATE(K1,6)

    M1 formula is =EDATE(K1,3) and the sample data used is from A2:G11 please refer the image below

    User's image

    Apply below conditional formatting in sequence for the range B2:G11 as below

    Add new rule as below and click ok and select stop if true

    User's image

    Add new rule as below

    User's image

    Add new rule as below and select the green in format.

    User's image

    Add new rule as below and select red in format

    User's image

    Add new rule as below and select orange in format.

    User's image

    Final conditional formatting rules manager is User's image

    Click Ok and you can see the expected result.

    User's image

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.