Hyperlink to another sheet that auto sorts to matching names

Cewheaton

New Member
Joined
May 14, 2018
Messages
1
Hello,

I have 2 sheets, Sheet1 "Capture" Sheet2 "BD TASK TRACKER". I am trying to have a link for each opportunity on Sheet1 that you will click and it will find the tasks associated with the Capture reference. Both sheets have the same format, Column A "Client" Column B "Title" ,etc. etc.

I used the following code below and it works, however, every cell that you click on in the sheet can activate. I only want the cells in Column A to work as the cell to be double-clicked.

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
Cancel = True
With Worksheets("BD TASK TRACKER")
.Select
.Range("A3").AutoFilter Field:=1, Criteria1:=Target.Value
.Range("A4").AutoFilter Field:=1, Criteria1:=Target.Value
.Range("A5").AutoFilter Field:=1, Criteria1:=Target.Value
.Range("A6").AutoFilter Field:=1, Criteria1:=Target.Value
.Range("A7").AutoFilter Field:=1, Criteria1:=Target.Value
.Range("A8").AutoFilter Field:=1, Criteria1:=Target.Value
.Range("A9").AutoFilter Field:=1, Criteria1:=Target.Value
.Range("A10").AutoFilter Field:=1, Criteria1:=Target.Value
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
Hi & welcome to MrExcel.
How about
Code:
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
[COLOR=#0000ff]If Target.Column <> 1 Then Exit Sub[/COLOR]
Cancel = True
With Worksheets("BD TASK TRACKER")
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,178
Members
453,021
Latest member
Justyna P

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