How to get cursor location to open on a specific cell adjacent to todays date

wbstadeli

Board Regular
Joined
Mar 11, 2016
Messages
153
Office Version
  1. 365
Platform
  1. Windows
Hi Guys,

I have a question, i have a time card with dates in column C, with the dates of the month filled in each row (example: C1=1/1/18, C2=1/2/18, C3=1/3/18, etc... Can i have a workbook_open code so that it searches that column or range (C1-C50) for todays date and then puts the cursor (selects) the cell to the immediate right of the cell containing todays date? If it doesnt find todays date then nothing...

Thanks!
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
Place this macro in the code module for ThisWorkbook. Change the sheet name to suit your needs. Save the file as a macro-enabled file. Close the workbook and then re-open it.
Code:
Private Sub Workbook_Open()
    Dim rng As Range
    Set rng = Sheets("Sheet1").Range("C:C").Find(Date)
    If Not rng Is Nothing Then
        rng.Offset(0, 1).Select
    End If
End Sub
 
Upvote 0

Forum statistics

Threads
1,223,898
Messages
6,175,274
Members
452,628
Latest member
dd2

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