Pages

Monday, June 22, 2020

Excel Macro to scroll to the top or bottom of the sheet


If you have a long sheet and are constantly scrolling all the way down to the bottom then back up to the top, here are two quick macros you can use to instantly go to the top or the bottom of the active sheet.

Sub GoTo_Top()
    With ActiveSheet
        Application.Goto Cells(1, 1), True
        End With
       
End Sub

Sub GoTo_Buttom()
    With ActiveSheet
        LastRow = Cells(Rows.Count, 2).End(xlUp).Row
        Application.Goto Range("B" & LastRow), True
    End With
End Sub

Use the developer tab to insert a command button, then link it to your macro to make it super easy for even the most inexperienced Excel user to instantly move from the top and the button of the spreadsheet.

If you don’t see the Developer tab at the top, go to File -> Options - > Customize Ribbon

I hope you enjoyed this quick tip! Sign up for my email list for more Excel tips.

1 comment:

I'd love to hear from you!
-Nick