Hi Mike
create a dynamic range name (e.g. MyLinks) consisting of one column with the
values in it that match to the hyperlink names
(to create a dynamic range name check out
http://www.contextures.com/xlNames01.html#Dynamic)
in the column next to this one, put in the range names that you want each
value to match to
e.g.
G1:G5 has 1,2,3,4,5 - this is the one you've names as a dynamic range
H1:H5 has KP,AA,AB,AC,AD
now change the code that i gave you to:
Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
On Error GoTo err_Handler
If Target.Address = "$A$1" Then
For Each c In Range("MyLinks")
If Target.Value = c.Value Then
Target.Offset(0, 1).Hyperlinks.Add Anchor:=Target.Offset(0,
1), Address:="", _
SubAddress:=c.Offset(0, 1).Value,
TextToDisplay:=c.Offset(0, 1).Value
End If
Next
End If
err_Handler:
Application.EnableEvents = True
End Sub
---
where "MyLinks" is the name of your dynamic range.
Hope this helps
Cheers
JulieD