Jump to a date (find a date) - Formual/Macro/ActiveX or Hyperlink

SelinaR

Board Regular
Joined
Feb 2, 2012
Messages
65
Office Version
  1. 2021
Platform
  1. Windows
  2. Mobile
  3. Web
Please help - I've tried various options found online and nothing is working:

I have a large spreadsheet with a long date range from A:3 to A:900

what would be the best way to jump to today's date?
I have seen formulas, Macro's, Active X controls, Hyperlinks?

I would prefere a Macro if possible.

THANKS:)
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
Is it possible to make this hyperlink a button/form control?
 
Upvote 0
Hi Selina, If you want to put it on buttton then you need to right VBA code ....

I can do it for you if you want.
 
Upvote 0
that would be brilliant do you need row and coloumn references?
 
Upvote 0
Hi Selina,

I am considering that you data is in Column A with Range A3:A900

put the below code on vba editot , Use Alt +F11

Code:
Sub searchdate()

lR = ActiveSheet.Range("A65536").End(xlUp).Row

For i = 3 To lR
    If Cells(i, 1) = Date Then
        Cells(i, 1).Select
    Exit For
    End If
Next i

End Sub


Insert any shapes or button on your activesheet .. then right click --> choose Assign macro > select searchdate

then just single click on button will do the same thing.
 
Upvote 0
Hiya

I stepped into my exsisting Macro's and added yours in the workbook, but on slecting the button, the Macro is giving me the following error:

Compile error - Variable not defined and it is pointing to the 1R = section of the Macro....

any suggestions?
 
Upvote 0
You need to declare the variables

Code:
Option Explicit
Sub searchdate()
Dim i, r As Integer
lR = ActiveSheet.Range("A65536").End(xlUp).Row

For i = 3 To lR
    If Cells(i, 1) = Date Then
        Cells(i, 1).Select
    Exit For
    End If
Next i

End Sub
 
Upvote 0
I've tried your new forumla but it's giving me the same error - how do I declare the variable please?
 
Upvote 0

Forum statistics

Threads
1,223,270
Messages
6,171,102
Members
452,379
Latest member
IainTru

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