Turning a cell yellow when the date is within 30 days of the value (date) of that cell

Patti 0 Reputation points
2026-06-18T21:20:19.3933333+00:00

I have a column in Excel with the due date. I've already created a rule to turn the cell red if the due date goes past the cells value or due date. I would like to create another rule whereas the cell with the due date turns yellow when it's within 30 days of being due.

Microsoft 365 and Office | Excel | For home | Windows
0 comments No comments

1 answer

Sort by: Most helpful
  1. AI answer

    2026-06-18T21:21:15.5166667+00:00

    Use another conditional formatting rule that tests whether the due date is within 30 days from today.

    Assuming the due dates are in column B starting at B2:

    1. Select the due date cells (for example, B2:B100).
    2. On the Home tab, in the Styles group, click Conditional Formatting > New Rule.
    3. Select Use a formula to determine which cells to format.
    4. In Format values where this formula is true, enter:
         =AND(B2>=TODAY(), B2<=TODAY()+30)
      
      Adjust B2 to match the first cell in the selected range.
    5. Click Format, choose a yellow Fill color, and click OK.
    6. Click OK again to save the rule.

    Make sure this “yellow” rule is ordered below the “red when overdue” rule in the Conditional Formatting Rules Manager, so that overdue dates stay red and only upcoming (within 30 days) dates turn yellow.


    References:

    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

Your answer

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