vincecodegreeen

New Member
Joined
Jan 17, 2014
Messages
39
I am learning VBA for excel. I have need to add hyperlinks to a series of some 4000 cells.Each is based on a identical cell pattern in sequential worksheets. So far I have tried the following:

Range("B2").Select
ActiveSheet.Hyperlinks.Add Anchor:=Selection, address:="", SubAddress:= _
"Max tree base'!P2", TextToDisplay:="Max tree base'!P2"
ActiveCell.Offset(1, 0).Range("A1").Select
ActiveSheet.Hyperlinks.Add Anchor:=Selection, address:="", SubAddress:= _
"'Max tree base'!H3", TextToDisplay:="'Max tree base'!H3"
Range("B4").Select
ActiveSheet.Hyperlinks.Add Anchor:=Selection, address:="", SubAddress:= _
"'Max tree base'!X3", TextToDisplay:="'Max tree base'!X3"
The sheet names need to be replaced with the output from For Each worksheet in the workbook (about 260) and the cell address with a consistent pattern of 15 cells in each sheet. I have an array of the cell addresses to apply to each worksheet as the code works through the list. How do I reference and insert those variables into the appropriate place.
I may be working this backwards and could use any insight you might suggest.
Thanks,
Vince
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.

Forum statistics

Threads
1,214,547
Messages
6,120,139
Members
448,948
Latest member
spamiki

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