S
Snoopy
Hey guys
I expect my macro to set a filter by exact match based on a value in
range G2.
The (part of) macro goes like this:
Sub Search ()
Sheets("list").Select
On Error Resume Next
On Error GoTo 0
UserVal1 = Range("G2").Value
If UserVal1 = False Then
Exit Sub
Else
Selection.AutoFilter Field:=1, Criteria1:="*" & UserVal1 & "*",
Operator:=xlOr
End If
End Sub
However this macro dont find EXACT match - but INCLUDED match
Question 1: What correction do I have to make to instruct the macro to
find EXACT match to range G2?
Question 2: What correction do I have to make to instruct the macro to
find EXACT match to values in range G2, G3 or G4 (expression incudes
at least one of the 3 different words)?
Most gratefull to any advise that will make this work
Best regards Snoopy
I expect my macro to set a filter by exact match based on a value in
range G2.
The (part of) macro goes like this:
Sub Search ()
Sheets("list").Select
On Error Resume Next
On Error GoTo 0
UserVal1 = Range("G2").Value
If UserVal1 = False Then
Exit Sub
Else
Selection.AutoFilter Field:=1, Criteria1:="*" & UserVal1 & "*",
Operator:=xlOr
End If
End Sub
However this macro dont find EXACT match - but INCLUDED match
Question 1: What correction do I have to make to instruct the macro to
find EXACT match to range G2?
Question 2: What correction do I have to make to instruct the macro to
find EXACT match to values in range G2, G3 or G4 (expression incudes
at least one of the 3 different words)?
Most gratefull to any advise that will make this work
Best regards Snoopy