Link to home
Start Free TrialLog in
Avatar of ADRIANA P
ADRIANA PFlag for United States of America

asked on

Need button to goes to the last record with DATA

need go to the las record of data

but data will increase so it will change as time goes

in this case F1211
Gotolast.xlsx
Avatar of aikimark
aikimark
Flag of United States of America image

Assign this statement to some keyboard shortcut or ribbon button:
activesheet.usedrange.specialcells(XlCellType.xlCellTypeLastCell).activate

Open in new window

Avatar of ADRIANA P

ASKER

aikimark Thnaks for the fast response

im not very computer skills
can you provide an sample with the fike i post here ?
If you are trying to navigate to the last record entered in column F, try this...

Sub GoToLastRecord()
Dim lr As Long
lr = Cells(Rows.Count, 6).End(xlUp).Row
Range("F" & lr).Select
End Sub

Open in new window

Gotolast.xlsm
Subodh Tiwari (Neeraj)
Thnaks for the fast responsse !
 

i want to put in other workbook how i can do that ??
ASKER CERTIFIED SOLUTION
Avatar of Subodh Tiwari (Neeraj)
Subodh Tiwari (Neeraj)
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Subodh Tiwari (Neeraj)


Gotolast-v2.xlsm is an excelent example
if i want do that are the same steps like you explain in ID: 42218548 ??
Do you have Developer Tab on the Ribbon?
Subodh Tiwari (Neeraj)
Yes ! i have it
Wait I will describe the steps in a moment.
Right click the Sheet1 Tab of the workbook  Gotolast-v2.xlsm I uploaded in THIS POST --> View Code --> And copy the code from the opened code window and paste it on Notepad.

Now to know how to insert a new command button and to implement this code to a new workbook, watch this short video.
InsertCommandButton.mp4
Subodh Tiwari (Neeraj)
Let me assimilate it

just one question the button go top will be create itself ??
i mean when i insert the code ??
There is only one button which will be moving on the sheet by adjusting it's position based on the Caption of the button.
The code changes the caption as well.
So when the caption is "Go To Last", clicking that button will navigate you to the last cell used in column F, move the button next to the last record and change the caption to "Go To Top".
And when the button caption is "Go To Top", clicking that button will navigate to the top, move the button to the top and change the caption of the button back to "Go To Last".
Great JOB !!