How to display hyperlink results at top of page in Excel?
Supposing you create a hyperlink in a cell of current worksheet, for example, cell A1 links to cell H200, when clicking on A1, the worksheet will jump to H200 directly. But sometimes you may need to display the hyperlink results at the top of page (the next row of the hyperlink cell) in order to view the result and the hyperlink cell together. This article will help you.
Display hyperlink results at top of page with VBA code
Display hyperlink results at top of page with VBA code
You can display hyperlink results at top of page with following VBA code.
1. Firstly, please freeze the hyperlink cell row with the Freeze Panes build-in function in Excel.
2. Right click the current sheet tab, select View Code from the right-clicking menu.
3. In the Microsoft Visual Basic for Applications window, copy and paste the following code into the Module window.
VBA: Display hyperlink results at top of page
Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)
ActiveWindow.ScrollRow = ActiveCell.Row
End Sub
4. Press Alt + Q keys simultaneously to close the Microsoft Visual Basic for Applications window.
By now, when you click on hyperlink in cell A1, you can see the hyperlink result is displayed at the top of page (just in the next row of the hyperlink cell).
Best Office Productivity Tools
Supercharge Your Excel Skills with Kutools for Excel, and Experience Efficiency Like Never Before. Kutools for Excel Offers Over 300 Advanced Features to Boost Productivity and Save Time. Click Here to Get The Feature You Need The Most...
Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier
- Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
- Open and create multiple documents in new tabs of the same window, rather than in new windows.
- Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!
