Tip: Other languages are Google-Translated. You can visit the English version of this link.
Log in
x
or
x
x
Register
x

or

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


Quickly select cells based on criteria in Excel

With Kutools for Excel's Select Specific Cells, you can select cells based on one or two criteria once time.  Click for 60 days free trial!
doc select dates
 
Kutools for Excel: with more than 200 handy Excel add-ins, free to try with no limitation in 60 days.

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.
doc conditional formatting date 1

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()

doc conditional formatting date 2

3. Click Format to go to Format Cells dialog, select one format you want to highlight the cells as you need.
doc conditional formatting date 3

4. Click OK > OK. The dates have been formatted.

Note: Today is 15/8/2018
doc conditional formatting date 4


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
doc conditional formatting date 5


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.

doc conditional formatting date 6
doc conditional formatting date 7

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.

doc conditional formatting date 8
doc conditional formatting date 9

Note: In the above formulas, B2 is the first date cell of your selected date range.


Quickly and easily convert date to other date formatting in Excel

Have you ever tried to convert a date to day, month or year only? The formulas maybe hard to remember, but the Apply Date Formatting of Kutools for Excel can quickly convert a standard date to the date formatting as you need as below screenshot shown. Dont, waite, click for 60 days free trial!
doc apply date format
 
Kutools for Excel: with more than 200 handy Excel add-ins, free to try with no limitation in 60 days.


Recommended Productivity Tools for Excel

Kutools for Excel Helps You Always Finish Work Ahead of Time, and Stand Out From Crowd

  • More than 300 powerful advanced features, designed for 1500 work scenarios, increasing productivity by 70%, give you more time to take care of family and enjoy life.
  • No longer need memorizing formulas and VBA codes, give your brain a rest from now on.
  • Become an Excel expert in 3 minutes, Complicated and repeated operations can be done in seconds, 
  • Reduce thousands of keyboard & mouse operations every day, say goodbye to occupational diseases now.
  • 110,000 highly effective people and 300+ world-renowned companies' choice.
  • 60-day full features free trial. 60-day money back guarantees. 2 years of free upgrade and support.

Brings Tabbed Browsing and Editing to Microsoft Office, Far More Powerful Than The Browser's Tabs

  • Office Tab is designed for Word, Excel, PowerPoint and Other Office Applications: 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!
Say something here...
symbols left.
You are guest ( Sign Up? )
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.

Be the first to comment.