Scrolling to top of spreadsheet - Excel 2007

Posted on 2011-05-02
Medium Priority
Last Modified: 2012-05-11
I have a spreadsheet with two tabs.  Is there a way to ensure that when I go from one tab to the other I am always at the top of the second spreadsheet even if I have scrolled down on the other spreadsheet.

Example:  I have scrolled down to column K33 on Spreadsheet_A
When I click on spreadsheet_B I would like to be at the top A1
Question by:morinia
  • 2

Expert Comment

ID: 35509604
The last cell chosen on any one sheet is the same, irrespective of where the selected cell is located on a different sheet.
You could write some code, but the easiest way is simply to press CTRL+Home before clicking on the next sheet. This will always return the selected cell to A1. The next time you click on that sheet the cell will be at the same position you left it in... that is: A1.
LVL 50
ID: 35509712

the previous comment could be formulated a bit more concise:

When a sheet is opened, the active cell will be the same cell that had the focus when the sheet was last active. If you scroll in sheet A and then open Sheet B, the scrolling in Sheet A will not make a difference to what cell is in focus on Sheet B.

Pressing Ctl-Home before clicking on a new sheet will not have an effect on the active cell on the new sheet, just on the active cell of the sheet you are about to leave.

Author Comment

ID: 35509742

I found that out when I tried it. Do you know the code to cause the sheet to position to A1 whenever a sheet is selected?
LVL 50

Accepted Solution

Ingeborg Hawighorst (Microsoft MVP / EE MVE) earned 2000 total points
ID: 35509771
Yes. Put this into the Sheet Module for each worksheet that you want to select A1 when activated

Private Sub Worksheet_Activate()
End Sub

Or, if you want to apply this to the whole workbook, put this in the ThisWorkbook module

Private Sub Workbook_SheetActivate(ByVal Sh As Object)
End Sub

cheers, teylyn

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
Windows Explorer lets you open cabinet (cab) files like any other folder. In VBA you can easily handle normal files and folders, but opening and indeed creating cabinet files takes a lot more - and that's you'll find here.
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question