How to add a dynamic line based on the current date in Excel?
If you have a worksheet with rows of dates and want to insert a line that automatically highlights the current date, Excel provides a simple way to achieve this. By using the Conditional Formatting feature, you can set up a dynamic rule that updates the line's position each day when the workbook is opened. This guide will show you how to create this functionality step by step.
Insert a line for the current date
Insert a line for the current date
To insert a line next to the current date in a cell, you can apply the "Conditional Formatting" function.
1. Select the range you want to insert line, and click "Home" > "Conditional Formatting" > "New Rule". See screenshot:
2. In the "New Formatting Rule" dialog, select "Use a formula to determine which cells to format", and type this formula =IF(B$1=TODAY(),TRUE, FALSE) to the "Format values where this formula is true" text box. Click "Format" to go to the "Format Cells" dialog, under "Border" tab, specify the line as you need. See screenshot:
3. Click "OK". A dividing line will be automatically inserted to the right of the current date cell and will be dynamically updated each time the workbook is opened.
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!
All Kutools add-ins. One installer
Kutools for Office suite bundles add-ins for Excel, Word, Outlook & PowerPoint plus Office Tab Pro, which is ideal for teams working across Office apps.





- All-in-one suite ā Excel, Word, Outlook & PowerPoint add-ins + Office Tab Pro
- One installer, one license ā set up in minutes (MSI-ready)
- Works better together ā streamlined productivity across Office apps
- 30-day full-featured trial ā no registration, no credit card
- Best value ā save vs buying individual add-in