Inserting a moving date line..

biffa006

New Member
Joined
Jan 25, 2012
Messages
2
Hello All..

I have searched this forum and others thoroughly for an answer - no closer than when I started off..

I'm using Excel 2010 on Win7.

I have created a Workbook which is a Planner for scheduled work for the year ahead.
I am trying to figure out how to insert a line or formatted column that highlights the current day/date, updating everytime I open up the workbook.

I have attached an image of what I'm trying to achieve. I have manually formatted this column as an example. I would like this formatting to follow each day to day.

I have seen this before so I know it is possible.
Any help would be extremely appreciated!


WorkbookneedsDateLine.png
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
Using conditional formatting is one option.

Select the range of cells that you want the color to show, in this case it looks like it starts on D3.

Find the Conditonal Formatting itme on the HOME menu.
Select New Rule
Under Rule Type, Use a Formula to determine which....

Enter this in the formula

=IF(D$4=TODAY(),TRUE, FALSE)


Select the format button and choose your color
 
Upvote 0
Perhaps:-
Code:
Private Sub Worksheet_Activate()
Dim Rng As Range
Dim Dn As Range
Range("D3").Resize(100, Columns.Count - 4).Interior.ColorIndex = xlNone
Set Rng = Range("D4").Resize(, Columns.Count - 4)
    For Each Dn In Rng
        If Dn = Date Then
            Dn.Resize(100).Interior.ColorIndex = 3
            Exit For
        End If
  Next Dn
End Sub
 
Upvote 0
Thank you so much matttclark..

This does exactly what I requested!! :biggrin:

Thank you kindly..


Using conditional formatting is one option.

Select the range of cells that you want the color to show, in this case it looks like it starts on D3.

Find the Conditonal Formatting itme on the HOME menu.
Select New Rule
Under Rule Type, Use a Formula to determine which....

Enter this in the formula

=IF(D$4=TODAY(),TRUE, FALSE)


Select the format button and choose your color
 
Upvote 0

Forum statistics

Threads
1,222,786
Messages
6,168,229
Members
452,171
Latest member
saeid025

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top