View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Phrank Phrank is offline
external usenet poster
 
Posts: 153
Default Hyperlinking from data in one sheet to matching data in another sheet

Wow, that works unbelievably outstanding! Thank you very much!

Frank

On Sun, 16 Dec 2007 18:38:38 -0800, "Jim Cone"
wrote:


Frank,
Link the hyperlink back to itself, then... '<<<
In the FollowHyperlink event...
Get the name from the hyperlink cell.
Select the other sheet.
Use the Match function to find the row with the name on the other sheet.
Scroll that row to the top.
Select the cell
'--
'Assumes hyperlinks are on Sheet1
'Assumes names to find are on Sheet2 in column D.
Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)
Dim vName
Dim vRow
vName = Me.Range(Target.SubAddress).Value
Worksheets("Sheet2").Select
vRow = Application.Match(vName, Worksheets("Sheet2").Columns("D"), 0)
ActiveWindow.ScrollRow = vRow - 1
Worksheets("Sheet2").Cells(vRow, 4).Select
End Sub
'--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware
(Excel Add-ins / Excel Programming)



"Phrank"

wrote in message
Hi,
I've got a list of names in column A on Sheet 1 in which I've inserted
hyperlinks to associated names on Sheet 2. To have the hyperlinks
work, I've named the cells in column A on Sheet 2 to correspond with
the name (e.g., Steve is in cell A1 on Sheet1 with a hyperlink to a
cell (A10) named Steve). This works fine until I add names to Sheet2
and resort it. Obviously the hyperlink is pointing to cell A10 no
matter which name shows up in the cell after resorting, even though
it's named Steve (Bob may end up in that cell after resorting). I
need the hyperlink to pop over to the cell that Steve is in on Sheet2
no matter where it is located, and no matter how it has been sorted.
Can anyone give me an idea of what to do here? Thanks.
Frank