May 29 2019 09:17 PM
i use bellow macro to auto filter my data on "Stock Detail" sheet. i have some numbers in my "ID" sheet and i use bellow to filter data of stock detail sheet. here with data about ID numbers in the sheet "ID" Column "ID info" Cell "D2" . how can i set the range doe D column (ID Info)
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
Cancel = True
With Worksheets("Stock Detail")
.Select
.Range("A4").AutoFilter Field:=1, Criteria1:=Target.Value
End With
End Sub
May 29 2019 10:25 PM
Hi ,
try this
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
Cancel = True
With Worksheets("Stock Detail")
.Select
.Range("A:D").AutoFilter Field:=4, Criteria1:=Target.Value
End With
End Sub
Regards
Bernd