hyperlink to defined name in same document

stenmark

New Member
Joined
Mar 15, 2005
Messages
23
Hi

When a hyperlink is done to a defined name in same document it will select the cell at botton of document...I would like the targeted cell (name) to be displayed at the top of the document...Anyone know how to do this?

Thanks in advance.

[/img]
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
Can you explain exactly what you mean ... what is the definition of the name? Is cell the one you expected to be selected? When you say "I would like the targeted cell (name) to be displayed at the top of the document." do you mean you want the scrolling to show the selected cell at the top of the window? ( that is not the same as position within a document ... or sheet as we like to say when using Excel )
 
Upvote 0
"do you mean you want the scrolling to show the selected cell at the top of the window?"

yes, that is correct =)

thanks
 
Upvote 0
Put a selection change event into the worksheet code, like this:
Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
    Set isect = Application.Intersect(Target, Range("ThereItIs"))
    If isect Is Nothing Then
        ' do nothing
    Else
        ActiveWindow.ScrollRow = ActiveCell.Row
        ActiveWindow.ScrollColumn = ActiveCell.Column
    End If
End Sub
 
Upvote 0
For the sheet where the named range is, right-click the sheet tab and do View Code. Then paste the code I've given into the code window .... altering the name I have "ThereItIs" to whatever name you've defined.
 
Upvote 0

Forum statistics

Threads
1,224,269
Messages
6,177,566
Members
452,784
Latest member
talippo

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