How to Use Excel Conditional Formatting for Dates Within 5, 10, or 15 Days
Question details
The user needs to apply conditional formatting to a column of dates to highlight upcoming deadlines within a specific timeframe (e.g., 5, 10, or 15 days) while ensuring past due dates are not highlighted.
- Product
- Excel
- Device & OS
- not provided
- Scenario
- Tracking upcoming events such as harvest dates or project deadlines that are approaching within a selected number of days.
- Observed behavior
- Requires a specific formula that exclusively targets future dates within a set interval, successfully excluding dates that have already passed.
Ensure that the cells in your target column are formatted as valid date values rather than plain text strings so the TODAY() function can calculate them correctly.
Use the TODAY() Function with an AND Formula
Create a custom conditional formatting rule utilizing the logical AND function to check if a date falls strictly between today and a few days in the future.
By combining the AND function with the TODAY() function, you can evaluate two conditions simultaneously. The formula ensures the date is both greater than or equal to today (excluding past dates) and less than or equal to your specified future limit.
Highlight the range of cells containing the dates you want to format (for example, L6:L100).
Navigate to the 'Home' tab on the Excel ribbon, click on 'Conditional Formatting', and select 'New Rule'.
In the dialog box, click on 'Use a formula to determine which cells to format'.
Type the formula `=AND($L6>=TODAY(),$L6<=TODAY()+10)` into the text box. Be sure to adjust the cell reference '$L6' to match the very first cell in your highlighted range.
Click the 'Format' button, choose a recognizable fill color for your upcoming dates, and click 'OK' twice to apply the rule.
Track Deadlines Effectively with WPS Spreadsheet
WPS Office provides robust and user-friendly conditional formatting tools that help you visually track upcoming dates, schedules, and deadlines with ease.
- 1. Select Data: Open your workbook in WPS Spreadsheet and select the column containing your target dates.
- 2. Access Formatting Rules: Go to the Home tab, click on Conditional Formatting, and choose New Rule.
- 3. Input Date Formula: Select the formula option and enter `=AND($L6>=TODAY(),$L6<=TODAY()+10)`.
- 4. Set Color and Save: Set your preferred highlight color under Format and click OK to instantly view upcoming dates.

Frequently Asked Questions
Why is my conditional formatting highlighting past dates as well?
If you only use a formula like `<TODAY()+10`, the spreadsheet includes all past dates because mathematically, any date in the past is less than 10 days from today. Using the AND function with `>=TODAY()` guarantees that overdue dates are excluded.
How do I apply different colors for dates within 5, 10, and 15 days?
You need to set up three separate conditional formatting rules. Apply the 5-day rule with one color, then create new rules for 10 and 15 days. Open 'Manage Rules' to ensure they are layered correctly, placing the shortest timeframe at the top of the list, and check 'Stop If True' to prevent colors from blending or overriding improperly.
Will the TODAY() formula update automatically every day?
Yes, the TODAY() function is completely dynamic. It recalculates based on your system clock every time you open the document or make an edit to the sheet, ensuring your highlighted dates are always accurate.




