I am attempting to filter column D on sheet1 by double clicking a cell in column A sheet2
I have the following formula:
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
If Intersect(Target, Range("a2")) Is Nothing Then
Else
Sheets("Sheet1").Select
Selection.autofilter Field:=4, Criteria1:=Sheets("Sheet2").Range("a2")
End If
End Sub
However, this only affects cell a2. When I change the "a2" to "a:a", it literally goes through the whole column. I would like it just effect the active cell I click on: i.e. a2, a5, a1000, a757....
Bookmarks