Hyper link one column to another

  • Thread starter Thread starter keyser_Soze
  • Start date Start date
K

keyser_Soze

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.
 
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
 
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.
 
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?
 
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
 
Back
Top