Excel hyperlink to scroll to specific section of active sheet.

noslenwerd

Board Regular
Joined
Nov 12, 2019
Messages
85
Office Version
  1. 365
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?
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
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.
 
Upvote 0
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
 
Upvote 0
insert formula into that row to show whatever cell you want to reference.
eg: click a1, then enter formula: =a100
 
Upvote 0
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.
 
Upvote 0

Forum statistics

Threads
1,223,886
Messages
6,175,191
Members
452,616
Latest member
intern444

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top