Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel Go to/Hyperlink/Anything

Status
Not open for further replies.

zenenigma

Programmer
Apr 23, 2001
119
US
I have a workbook with 2 sheets. The first sheet displays a series of 10-digit numbers (anywhere from 1 - 100 or so rows worth of numbers) in the "A" column. The second sheet has an "A" column that contains the same numbers, but spaced out because there are details about each number in the B-H columns (making it branch out to the right, tree-like).

I want to be able to click on a button/hyperlink/something in the "B" column (or somewhere near "A") of the first page, reference the "A" column on that page to find it's value, and then jump to that referenced value where it appears on the 2nd page.

The go to command seems useless to me, as I can't put any code within it.

If I do ever manage to pull this off, I'll also need to create/loop the above code on the fly for every row in the "A" column on Page 1 (the amount of rows differ each time I have new data).

Thanks.
 
The following code would match 100100111 from Sheet1 column A with anything like 1 0 0 1 0 0 1 1 1 in column A of sheet 2. You could use a button or Sheet double click action to activate the code.

Sub TryThis()
Dim srchItem
Dim r As Integer
srchItem = ActiveCell.Value
For r = 1 To 1000
If Val(Sheets("Sheet2").Cells(r, 1).Value) = srchItem Then
Sheets("Sheet2").Select
Cells(r, 1).Select
Exit Sub
End If
Next r
End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top