Scroll to last cell with date

sharky12345

Well-known Member
Joined
Aug 5, 2010
Messages
3,422
Office Version
  1. 2016
Platform
  1. Windows
I have a series of dates in column E and I need to scroll to the last cell which has today as the current date.

If it makes a difference, the cells are formatted as "dd/mm/yyyy"

Anyone?
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
Maybe...

Code:
Sub findlastdate()
Application.Goto Columns(5).Find(CDate(Date), , xlValues, , xlByRows, xlPrevious), True
End Sub
 
Last edited:
Upvote 0
Cheers Mark - however, that gives me a run time error 5, Invalid procedure call or argument......

Any ideas?
 
Upvote 0
Try this:
Since you say Todays Date is in last cell with data in column E.
Code:
Sub Goto_Today()
'Modified 10/9/2019 4:02:05 AM  EDT
Application.ScreenUpdating = False
Dim i As Long
Dim j As Long
Dim Lastrow As Long
Lastrow = Cells(Rows.Count, "E").End(xlUp).Row
Application.Goto Reference:=Range("E" & Lastrow), Scroll:=True
        With ActiveWindow
            i = .VisibleRange.Rows.Count / 2
            j = .VisibleRange.Columns.Count / 2
            .SmallScroll Up:=i, ToLeft:=j
        End With
Application.ScreenUpdating = True
End Sub
 
Upvote 0
Cheers Mark - however, that gives me a run time error 5, Invalid procedure call or argument......

Any ideas?

No error when I run it so no unless you are using a Mac.

Since you say Todays Date is in last cell with data in column E
M.A.I.T, that isn't what the question says.
 
Last edited:
Upvote 0
Thanks - got it working, not sure what I'd done but it works fine now.

Thanks to both for your help!
 
Upvote 0

Forum statistics

Threads
1,223,884
Messages
6,175,177
Members
452,615
Latest member
bogeys2birdies

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