VBA Hyperlink to matched cell on different sheet

jwdesselle

New Member
Joined
Sep 29, 2009
Messages
3
Good afternoon everyone. This is one of those 'summary sheet with hyperlinks' questions. I have everything working great, but my hyperlinks all link to !A1 and I would like to change that to the matching cell on the destination sheet.

The code below is part of a loop which takes some of the contents of each sheet and copies onto summary sheet
Code:
Set CopyRng = wSheet.Range("B2:D12")

The code below places the hyper link in column D like I want. But, I want to somehow change !A1 below to a formula that matches cell in column C of summary sheet ("EmailSchedule") to corresponding cell on wSheet.Name in column D.

The code snipit below is just a tiny portion of a really long thing. Wish I could post my entire workbook, but will see how far I can get with this.

Thanks!

Code:
'Create hyperlinks to corresponding tab
'If number of messages changes on Monthly tabs, increase the number on the For line below
Dim i1 As Integer
For i1 = 1 To 11
'Range("D:D").Cells.SpecialCells(xlCellTypeLastCell).Row
ActiveCell.Hyperlinks.Add Anchor:=.Range("D" & CStr(i1)), Address:="", _
SubAddress:="'" & wSheet.Name & "'!A1", TextToDisplay:=wSheet.Name
Next i1
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce

Forum statistics

Threads
1,215,066
Messages
6,122,948
Members
449,095
Latest member
nmaske

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