Go to a Cell Below the Last Populated Cell Q

J

John

I have the following simple code that goes to CL5 within the Schedule
worksheet and freezes the panes but what would I add to it so that the
cursor goes the the cell below the last cell there is a value in. For
example say if there is a value in CL8 I want the cursor to land in CL9

Thanks



Application.Goto Range("Schedule!CL5"), True
ActiveCell.Offset(2, 0).Select
ActiveWindow.FreezePanes = True
 
T

Tom Ogilvy

Application.Goto Range("Schedule!CL5"), True
ActiveCell.Offset(2, 0).Select
ActiveWindow.FreezePanes = True
cells(rows.count,"CL").End(xlup).Offset(1,0).Select
 
J

John

Thanks again Tom


Tom Ogilvy said:
Application.Goto Range("Schedule!CL5"), True
ActiveCell.Offset(2, 0).Select
ActiveWindow.FreezePanes = True
cells(rows.count,"CL").End(xlup).Offset(1,0).Select
 
J

John

A second twist on my original query, which I am trying to achieve on a
different worksheet, is to go to the cell, 2 columns to the right of the
cell the current day is displayed in.

I have a list of days of the year in column A, input starts on Column C. I
want to initiate the user to go to the 'Current day' via the ()NOW function.
Part of the code I wish to use, which will freeze panes etc is below, but
not sure the syntax for including the ()NOW function

Thanks

Application.Goto Range("Schedule!A1"), True
ActiveCell.Offset(2, 0).Select
ActiveWindow.FreezePanes = True
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top