[Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 424
  • Last Modified:

Copy hyperlink in excel

I have a large excel file that I want to have a hyperlink from cell a to go to cell bk

How can format the cell to know a1 goes to bk1 a2 to bk2 and so on?
0
natevelli2
Asked:
natevelli2
1 Solution
 
krishnakrkcCommented:
Hi

Put this code in the sheet module. Right click on tab name > view code and paste the code.

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
    
    Select Case Target.Column
        Case 1: Application.Goto Cells(Target.Row, 63)
        Case 63: Application.Goto Cells(Target.Row, 1)
    End Select
    
End Sub

Open in new window


Kris
0
 
BullmanTechCommented:
No need for VBA here.

Put this in cell A1 and copy down as desired.

=HYPERLINK("#BK"&ROW(),"BK"&ROW())
0
 
natevelli2Author Commented:
Thank you that worked
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now