Lookup value in a list and find it in another worksheet

SwiftM

New Member
Joined
Sep 11, 2021
Messages
19
Office Version
  1. 365
Platform
  1. Windows
Hi all,

In Range B3:B12 I have the numbers 1,2,3,4,5,6,7,8 etc. This is in worksheet "Log".

In Range B1:K1 I have the same numbers, but this is in worksheet "Admin".

What I would like to do, using the DoubleClick option is when I double click on a cell with one of those numbers in in "Log" worksheet, vba looks up that cell value on worksheet "Admin" range B1:K1 and goes to that matching cell.

I have absolutely no idea how to do this.

Could anyone please help me?

Many thanks!

Kind regards,
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
You can put the following formula, for example in column C3 to C12.
Click on any of the cells in column C and the cursor will go to that cell.
Change the "Go to" formula to the text you want.

Cell Formulas
RangeFormula
C3:C12C3=HYPERLINK("#"&CELL("address",INDEX(Admin!$B$1:$K$1,MATCH(B3,Admin!$B$1:$K$1,0))),"Go to: "&B3)
 
Upvote 0
You can put the following formula, for example in column C3 to C12.
Click on any of the cells in column C and the cursor will go to that cell.
Change the "Go to" formula to the text you want.

Cell Formulas
RangeFormula
C3:C12C3=HYPERLINK("#"&CELL("direccion",INDEX(Admin!$B$1:$K$1,MATCH(B3,Admin!$B$1:$K$1,0))),"Go to: "&B3)

Thank you, Dante, but it comes up as a #VALUE! error in each cell.

So, when I click on cell C3 where the formula is placed, it should lookup the value in B3 in "Log", match it with one of the cells in range B1:K1 in "Admin" and then goto that cell in "Admin"?
 
Upvote 0
I think my correction was late.
Copy again the formula from post 2
Excel Formula:
=HYPERLINK("#"&CELL("address",INDEX(Admin!$B$1:$K$1,MATCH(B3,Admin!$B$1:$K$1,0))),"Go to: "&B3)
 
Upvote 0
I think my correction was late.
Copy again the formula from post 2
Excel Formula:
=HYPERLINK("#"&CELL("address",INDEX(Admin!$B$1:$K$1,MATCH(B3,Admin!$B$1:$K$1,0))),"Go to: "&B3)
Absolutely brilliant, thank you Dante.

Just another real quick question if I could pick your brains....

When there is no value in a cell in the range B3:B12, it will obviously show a #N/A value. Is there a way in which I can hide this error, and when a value is inserted then formula then kicks in and shows the "Go To" formula?

Thanks again.
 
Upvote 0
Is there a way in which I can hide this error

Excel Formula:
=IFERROR(HYPERLINK("#"&CELL("address",INDEX(Admin!$B$1:$K$1,MATCH(B3,Admin!$B$1:$K$1,0))),"Go to: "&B3),"")
 
Upvote 0
If you want the doubleclick event...
Double click on the Log Sheet and insert this code :
VBA Code:
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
    If Not Intersect(Target, [B:B]) Is Nothing Then
        Call find
    End If
End Sub

After , insert a module with this code below :

VBA Code:
Sub find()
rngB = ActiveCell.Value

    Sheets("Admin").Select
    Columns("B:K").Select
    Selection.find(What:=rngB, After:=ActiveCell, LookIn:=xlFormulas, _
        LookAt:=xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
        MatchCase:=False, SearchFormat:=False).Activate
      
ActiveCell.Offset(0, 0).Select
End Sub
 
Upvote 0

Forum statistics

Threads
1,214,591
Messages
6,120,432
Members
448,961
Latest member
nzskater

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top