TURN CELL CONTENT INTER HYPERLINK FOR SAME NAMED SHEET

JuicyMusic

Board Regular
Joined
Jun 13, 2020
Messages
210
Office Version
  1. 365
Platform
  1. Windows
I have a list in column A of a summarizing sheet called SOFT COSTS. It lists the names of all the sheets to the right of it exactly. Same spelling.

NOTE: This summarizing sheet will have more names added to it due to an INDIRECT formula that creates an additional sheet name from a new tab to the right being created.


This list could be rows long.....which means that I have 100 sheets to do my work on and scroll around.

I would like to turn the sheet names in column A of the sheet called SOFT COSTS into hyperlinks.

I tried reading other posts but I couldn't make any of them work for me. Thank you so much!

Juicy,
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
VBA Code:
Sub JuicyMusic()
Dim shtnme As String
Dim LR As Long
Dim I As Integer

LR = Cells(Rows.count, "A").End(xlUp).Row
For I = 2 To LR   'Change the 2 to the start row that contains your data
    shtnme = Range("A" & I).Value
    ActiveSheet.Hyperlinks.Add Anchor:=Range("A" & I), Address:="", SubAddress:= _
         shtnme & "!A1", TextToDisplay:=shtnme
Next I
End Sub
 
Upvote 0
VBA Code:
Sub JuicyMusic()
Dim shtnme As String
Dim LR As Long
Dim I As Integer

LR = Cells(Rows.count, "A").End(xlUp).Row
For I = 2 To LR   'Change the 2 to the start row that contains your data
    shtnme = Range("A" & I).Value
    ActiveSheet.Hyperlinks.Add Anchor:=Range("A" & I), Address:="", SubAddress:= _
         shtnme & "!A1", TextToDisplay:=shtnme
Next I
End Sub
Hi Dermie, why are you yelling at me? I left work to attend to family and am back this morning excited to see a response.....and I find you yelling.

I changed the 2 to and 8 because the sheet name list starts on row 8. I'm getting a Sytax Error. What should be my next step? Should I highlight the whole list then run the macro?
Does it make a difference if the cell contents of that list are the results of formula's instead of a hard text?
Thanks!
Juicy,
 
Upvote 0
VBA Code:
Sub JuicyMusic()
Dim shtnme As String
Dim LR As Long
Dim I As Integer

LR = Cells(Rows.count, "A").End(xlUp).Row
For I = 2 To LR   'Change the 2 to the start row that contains your data
    shtnme = Range("A" & I).Value
    ActiveSheet.Hyperlinks.Add Anchor:=Range("A" & I), Address:="", SubAddress:= _
         shtnme & "!A1", TextToDisplay:=shtnme
Next I
End Sub
No response? Should you be blocked?!!
 
Upvote 0

Forum statistics

Threads
1,223,229
Messages
6,170,881
Members
452,364
Latest member
springate

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