+ Reply to Thread
Results 1 to 5 of 5

Hyper link one column to another

  1. #1
    keyser_Soze@usa.com
    Guest

    Hyper link one column to another

    I would like to have my columns hyper link one another.

    For example: Click on B2 would take you to N2, and vice-versa. Click
    on C2 would take you to O2... and so on through column j linked to V.
    Is this possible without having to make the link for each cell?

    This is a timesheet template and the columns b though J are the hours
    and N through V are the text comments for those hours. When I copy the
    template to a
    new sheet, there will be no data in any column. I would like to be
    able to enter an amount or formula (=end-start) for time spent and then
    be able to click on that cell and hyperlink to the comments column.

    Another options would be if there is a way to add a comment to a cell.

    Thanks for any insight.


  2. #2
    Bernie Deitrick
    Guest

    Re: Hyper link one column to another

    You could do it if you don't mind double-clicking on the cell. Copy the code below, right-click on
    the sheet tab, select "View Code" and paste the code in the window that appears. When you
    double-click on a cell in columns B through J, you will be taken to the appropriate column.

    HTH,
    Bernie
    MS Excel MVP

    Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
    If Not Intersect(Target, Range("B:J")) Is Nothing Then Target.Offset(0, 12).Select
    End Sub


    <keyser_Soze@usa.com> wrote in message news:1127998613.534045.305910@g49g2000cwa.googlegroups.com...
    >I would like to have my columns hyper link one another.
    >
    > For example: Click on B2 would take you to N2, and vice-versa. Click
    > on C2 would take you to O2... and so on through column j linked to V.
    > Is this possible without having to make the link for each cell?
    >
    > This is a timesheet template and the columns b though J are the hours
    > and N through V are the text comments for those hours. When I copy the
    > template to a
    > new sheet, there will be no data in any column. I would like to be
    > able to enter an amount or formula (=end-start) for time spent and then
    > be able to click on that cell and hyperlink to the comments column.
    >
    > Another options would be if there is a way to add a comment to a cell.
    >
    > Thanks for any insight.
    >




  3. #3
    keyser_Soze@usa.com
    Guest

    Re: Hyper link one column to another

    That works great. I added

    If Not Intersect(Target, Range("N:V")) Is Nothing Then Target.Offset(0,
    -12).Select
    so that I could double click both ways.

    Thanks for your help.


  4. #4
    keyser_Soze@usa.com
    Guest

    Re: Hyper link one column to another

    I would like this functionality to work on all sheets, not just the one
    I am currently using. How can I make this macro work on all sheets?


  5. #5
    Bernie Deitrick
    Guest

    Re: Hyper link one column to another

    Put this into the Codemodule of the ThisWorkbook object:

    Private Sub Workbook_SheetBeforeDoubleClick( _
    ByVal Sh As Object, ByVal Target As Range, Cancel As Boolean)
    If Not Intersect(Target, Range("B:J")) Is Nothing Then Target.Offset(0, 12).Select
    If Not Intersect(Target, Range("N:V")) Is Nothing Then Target.Offset(0, -12).Select
    End Sub

    HTH,
    Bernie
    MS Excel MVP


    <keyser_Soze@usa.com> wrote in message news:1128009106.749502.249890@z14g2000cwz.googlegroups.com...
    >I would like this functionality to work on all sheets, not just the one
    > I am currently using. How can I make this macro work on all sheets?
    >




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1