• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 427
  • 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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Microsoft Windows 7 Basic

This introductory course to Windows 7 environment will teach you about working with the Windows operating system. You will learn about basic functions including start menu; the desktop; managing files, folders, and libraries.

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