How to conditional formatting based on date in Excel?
As we known, the Conditional Formatting can auto change cell format based on the cell contents. This tutorial, I will introduce how to conditional formatting cells based on date in Excel.
Conditional formatting dates equal to/greater than/older than TODAY
Conditional formatting past dates
Conditional formatting future dates
Conditional formatting between two dates
Conditional formatting based on date in another column
Conditional formatting dates equal to/greater than/older than TODAY
To conditional formatting dates, you need to create a new rule.
1. Select the cells you want to add the conditional formatting, click Home > Conditional Formatting > New Rule.
2. In the New Formatting Rule dialog, select Use a formula to determine which cells to format in Select a Rule Type section, then choose one formula as you need to type in Format values where this formula is true text box.
- equal to today:=$B2=TODAY()
- reater than today: =$B2>TODAY()
- Older than today: =$B2<TODAY()
3. Click Format to go to Format Cells dialog, select one format you want to highlight the cells as you need.
4. Click OK > OK. The dates have been formatted.
Note: Today is 15/8/2018
Conditional formatting past dates
If you want to conditional formatting the past dates, you can do as follows in the New Formatting Rule dialog.
1. Select one of below formulas as you need, and type it into the Format values where this formula is true text box.
- More than 30 days ago: =TODAY()-$B2>30
- From 30 to 15 days ago, inclusive: =AND(TODAY()-$B2>=15, TODAY()-$B2<=30)
- Less than 15 days ago: =AND(TODAY()-$B2>=1, TODAY()-$B2<15)
2. Then click Format to select one format in the Format Cells dialog.
3. Click OK > OK to close the dialogs.
Note: Today is 15/8/2018
Conditional formatting future dates
To conditional formatting future dates, you can do as these:
1. Select one of below formulas as you need, and type it into the Format values where this formula is true text box.
- Will occur in more than 30 days from now: =$B2-TODAY()>30
- In 30 to 15 days, inclusive: =AND($B2-TODAY()>=15, $B2-TODAY()<=30)
- In less than 15 days: =AND($B2-TODAY()>=1, $B2-TODAY()<15)
2. Then click Format to select one format in the Format Cells dialog.
3. Click OK > OK to close the dialogs.
Conditional formatting between two dates
To conditional formatting between two dates, select the cells and use this formula, =AND($B2>=$D$2,$B2<=$E$2) D2 is the start date, E2 is the end date. Then format the cells with a format you need.
![]() |
![]() |
Conditional formatting based on date in another column
If you want to conditional formatting cells based on the date in another column, you can do as these.
1. Supposing you want to highlight sales in column C while the relative dates in column B is 16/8/2018, please select column C range firstly.
2. Enable the New Formatting Rule dialog and type this formula =$B2=DATEVALUE("8/16/2018") into the Format values where this formula is true text box, then format the cells in Format Cells dialog.
![]() |
![]() |
Note: In the above formulas, B2 is the first date cell of your selected date range.
Best Office Productivity Tools
Supercharge Your Excel Skills with Kutools for Excel, and Experience Efficiency Like Never Before. Kutools for Excel Offers Over 300 Advanced Features to Boost Productivity and Save Time. Click Here to Get The Feature You Need The Most...
Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier
- Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
- Open and create multiple documents in new tabs of the same window, rather than in new windows.
- Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!















