PDA

View Full Version : [SOLVED:] Converting Text to Worksheet Hyperlink



jacksonworld
08-01-2005, 11:36 PM
Hi, I have a bit of a curly question.

I have cells in F2:F999 that contain worksheet names separated by commas.

eg. In Cell F3 (Note: There is a formula behind this), the display is as follows: Sheet2, Sheet4, Sheet6

These sheets already exist in my workbook.

My question is, how can I convert the text to worksheet hyperlinks?

That is, if I clicked on Sheet4 in Cell F3, I would be transferred to the actual worksheet Sheet4.

I hope someone can help.

Thanks

geekgirlau
08-01-2005, 11:44 PM
Someone correct me if I'm wrong, but I don't think you can have multiple hyperlinks in a single cell.:reading:

jacksonworld
08-01-2005, 11:59 PM
Bummer. That would be a shame.

If that is the case, assume that each cell contains only one worksheet name.

Thanks

Bob Phillips
08-02-2005, 02:43 AM
Worksheet event code



Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim sh As Worksheet
If Not Intersect(Target, Me.Range("F2:F999")) Is Nothing Then
With Target
On Error Resume Next
Set sh = Worksheets(.Value)
On Error GoTo 0
If Not sh Is Nothing Then
sh.Activate
End If
End With
End If
End Sub

jacksonworld
08-02-2005, 04:33 PM
Great work. That seems to be working very well.

Thanks again

Zack Barresse
08-02-2005, 04:54 PM
Using nested IF functions, you can use the HYPERLINK function and have multiple h-links. That's about the only way I know how to. Or use code, as xld has done for you. :)

lucas
08-02-2005, 05:44 PM
Hate to brag on xld but thats slick :devil: