Copy hyperlink in excel

Posted on 2012-09-17
Last Modified: 2012-09-18
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?
Question by:natevelli2
    LVL 18

    Accepted Solution


    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

    LVL 5

    Expert Comment

    No need for VBA here.

    Put this in cell A1 and copy down as desired.


    Author Closing Comment

    Thank you that worked

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    Drop Down List with Unique/Distinct Values (enhancing the Combo-Box with a few steps and a little code) David miller (dlmille) Intro Have you ever created a data validation list from a database field or spreadsheet column (e.g., Zip Codes or Co…
    Workbook link problems after copying tabs to a new workbook? David Miller (dlmille) Intro Have you either copied sheets to a new workbook, and after having saved and opened that workbook, you find that there are links back to the original sou…
    This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.
    This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.

    734 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now