go last row

Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

Forum home » Delegate support and help forum » Microsoft Excel VBA Training and help » Go to last row

Go to last row

resolvedResolved · Medium Priority · Version 2010

Andrew has attended:
Excel Advanced course
Excel VBA Intro Intermediate course
Excel Advanced - For Power Users course
Excel Dashboards for Business Intelligence course

Go to last row

I have created a workbook that will be used to capture data over a 6 month period. The workbook has dropdown lists and conditional formatting in it. To save people scrolling to the bottom every time they open the workbook, is it possible to write some code that, when the workbook is opened, will show the last row?

RE: Go to last row

I'd like to do this by used a command button if possible

RE: Go to last row

Hi Andrew,

Thank you for the forum question.

You can create an Open_Workbook event.

In the visual basic editor in the Project Explorer (The window top left). Double click ThisWorkBook and type the code below.

You will need to amend it. Change "Employees" to the name of your worksheet and change "a6" to the first cell reference in your table.


Private Sub Workbook_Open()
Sheets("Employees").Range("a6").End(xlDown).Select

End Sub

I hope this will help.

Kind regards

Jens Bonde
Microsoft Office Specialist Trainer

Tel: 0207 987 3777
Best STL - https://www.stl-training.co.uk
98%+ recommend us

London's leader with UK wide delivery in Microsoft Office training and management training to global brands, FTSE 100, SME's and the public sector

RE: Go to last row

Thank you Jens - this works.

Much appreciated!

Andrew

RE: Go to last row

Hi Andrew,

I am happy to help.

Please let us know if we can help you in the future.

Kind regards

Jens Bonde
Microsoft Office Specialist Trainer

Tel: 0207 987 3777
Best STL - https://www.stl-training.co.uk
98%+ recommend us

London's leader with UK wide delivery in Microsoft Office training and management training to global brands, FTSE 100, SME's and the public sector

 

Training courses

 

Training information:

Welcome. Please choose your application (eg. Excel) and then post your question.

Our Microsoft Qualified trainers will then respond within 24 hours (working days).

Frequently Asked Questions
What does 'Resolved' mean?

Any suggestions, questions or comments? Please post in the Improve the forum thread.


 

Excel tip:

Quickly hide and unhide rows and columns

Use the keyboard shortcut Ctrl+9 to hide selected rows and Ctrl+0 to hide selected columns. The good thing about this shortcut is that you do not need to select entire rows or columns. For example, select B3:D3 then press Ctrl+0 to hide columns B to D.

Ctrl+Shift+9 unhides rows and Ctrl+Shift+0 unhides columns.

View all Excel hints and tips


Server loaded in 0.08 secs.