Excel hyperlink to scroll to specific section of active sheet.

noslenwerd

New Member
Joined
Nov 12, 2019
Messages
42
I know you can link directly to a cell pretty easily with an image in excel, but what if I want it to have the specified cell show AT THE TOP of the sheet?

What happens now, is the hyperlink does take me to a specific cell, but it scrolls to the bottom of the sheet. I would like to have the selected cell be at the top of the sheet.

Any tips?
 

jmacleary

Well-known Member
Joined
Oct 5, 2015
Messages
832
Office Version
2007
Platform
Windows
You could have the image click run a macro that first selects a cell well below the one you want, then selects the wanted cell.
 

RicoS

New Member
Joined
May 1, 2019
Messages
10
In vba, you could use:

VBA Code:
Application.GoTo Range("A123"), true
replacing A123 with your range (probably best to declare your range in a variable
 

solidENM

Board Regular
Joined
Feb 23, 2017
Messages
87
insert formula into that row to show whatever cell you want to reference.
eg: click a1, then enter formula: =a100
 

RicoS

New Member
Joined
May 1, 2019
Messages
10
Interestingly, if you put a hyperlink to another cell into a worksheet cell (not using the hyperlink formula, which could be called from the selectionChange event instead) then you can use the followhyperlink event in the worksheet code:

VBA Code:
Private Sub Worksheet_FollowHyperlink(ByVal Target as Hyperlink)
    Application.Goto Range(Target.Name), True
End Sub
Obviously you would have to moderate the code to ensure that it was a worksheet range that you were linking to, or add in error handling to cope.
 

Forum statistics

Threads
1,085,545
Messages
5,384,371
Members
401,889
Latest member
Pmccollin

Some videos you may like

This Week's Hot Topics

Top