ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   hyperlink item#'s across worksheets (https://www.excelbanter.com/excel-programming/355722-hyperlink-item-s-across-worksheets.html)

Matt Hughes

hyperlink item#'s across worksheets
 
l'm looking for help on how to create a significant number of hyperlinks
(500+) that will go across worksheets. The hyperlink will be based upon an
item# in one worksheet and it will need to find it's matching item# on
another worksheet. The worksheets are oriented differently so it seems some
type of lookup would be needed. Any help would be very appreciated.

Dave Peterson

hyperlink item#'s across worksheets
 
How about an alternative?

Use a macro that searches sheet2 column A and if it finds a match, it goes
there.

I'd drop a button from the forms toolbar in Row 1 of sheet1--and make row 1
always visible (window|freeze panes)

Then assign this macro to that button. (The code depends on where the
activecell is.)

Option Explicit
Sub testme01()
Dim myRng As Range
Dim myCell As Range
Dim res As Variant

With Worksheets("sheet2")
Set myRng = .Range("a:a")
End With

Set myCell = ActiveCell.EntireRow.Cells(1)

res = Application.Match(myCell.Value, myRng, 0)

If IsError(res) Then
Beep
Else
Application.Goto myRng(res), scroll:=True
End If

End Sub

Matt Hughes wrote:

l'm looking for help on how to create a significant number of hyperlinks
(500+) that will go across worksheets. The hyperlink will be based upon an
item# in one worksheet and it will need to find it's matching item# on
another worksheet. The worksheets are oriented differently so it seems some
type of lookup would be needed. Any help would be very appreciated.


--

Dave Peterson

Matt Hughes

hyperlink item#'s across worksheets
 
Dave,

Excellent fix brother! Works fine.

"Dave Peterson" wrote:

How about an alternative?

Use a macro that searches sheet2 column A and if it finds a match, it goes
there.

I'd drop a button from the forms toolbar in Row 1 of sheet1--and make row 1
always visible (window|freeze panes)

Then assign this macro to that button. (The code depends on where the
activecell is.)

Option Explicit
Sub testme01()
Dim myRng As Range
Dim myCell As Range
Dim res As Variant

With Worksheets("sheet2")
Set myRng = .Range("a:a")
End With

Set myCell = ActiveCell.EntireRow.Cells(1)

res = Application.Match(myCell.Value, myRng, 0)

If IsError(res) Then
Beep
Else
Application.Goto myRng(res), scroll:=True
End If

End Sub

Matt Hughes wrote:

l'm looking for help on how to create a significant number of hyperlinks
(500+) that will go across worksheets. The hyperlink will be based upon an
item# in one worksheet and it will need to find it's matching item# on
another worksheet. The worksheets are oriented differently so it seems some
type of lookup would be needed. Any help would be very appreciated.


--

Dave Peterson



All times are GMT +1. The time now is 12:36 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com