How to scroll a specified sheet or all sheets to top in Excel?
This article will show you method of scrolling a specified sheet or all sheets to the top row in a workbook in Excel.
- Reuse Anything: Add the most used or complex formulas, charts and anything else to your favorites, and quickly reuse them in the future.
- More than 20 text features: Extract Number from Text String; Extract or Remove Part of Texts; Convert Numbers and Currencies to English Words.
- Merge Tools: Multiple Workbooks and Sheets into One; Merge Multiple Cells/Rows/Columns Without Losing Data; Merge Duplicate Rows and Sum.
- Split Tools: Split Data into Multiple Sheets Based on Value; One Workbook to Multiple Excel, PDF or CSV Files; One Column to Multiple Columns.
- Paste Skipping Hidden/Filtered Rows; Count And Sum by Background Color; Send Personalized Emails to Multiple Recipients in Bulk.
- Super Filter: Create advanced filter schemes and apply to any sheets; Sort by week, day, frequency and more; Filter by bold, formulas, comment...
- More than 300 powerful features; Works with Office 2007-2019 and 365; Supports all languages; Easy deploying in your enterprise or organization.
Scroll a specified sheet or all sheets to top with VBA code
To scroll a specified sheet or all sheets to top row in Excel, please do as follows.
1. In the worksheet you need to scroll to top, please press the Alt + F11 keys to open the Microsoft Visual Basic for Applications window.
2. In the Microsoft Visual Basic for Applications window, click Insert > Module. Then copy and paste VBA code into the Code window.
VBA code: Scroll a specified worksheet to top
Sub ScrollToTop() ActiveWindow.ScrollRow = 1 End Sub
For scrolling all worksheets to the top in current workbook, please apply the following VBA code.
VBA code: Scroll all worksheets to top
Sub Select_A1_On_Activeworkbook() Dim xSheet As Worksheet For Each xSheet In ActiveWorkbook.Sheets xSheet.Activate ActiveSheet.Range("A1").Select Next ActiveWorkbook.Worksheets(1).Activate End Sub
3. After entering VBA code into the Code window, please press the F5 key to run the code.
Then active worksheet or all worksheets in the current workbook are scrolled to top immediately.