Hi I have to code below that performs and advanced filter which finds the specific range however I need it to find an exact match also when it performs the filter.
for example now if finds the name PRODUCT01 but finds all products starting with PRODUCT01 so its finding e.g PRODUCT011, PRODUCT0113
How can I change this to only find exact matching strings?
Dim rngCrit As Range
Dim rngData As Range
Set rngData = Range("Main[#All]")
With Sheets("Input")
Set rngCrit = .Range("A1", .Range("A" & Rows.Count).End(xlUp))
End With
rngData.AdvancedFilter Action:=xlFilterInPlace, CriteriaRange:=rngCrit, Unique:=True
for example now if finds the name PRODUCT01 but finds all products starting with PRODUCT01 so its finding e.g PRODUCT011, PRODUCT0113
How can I change this to only find exact matching strings?
Dim rngCrit As Range
Dim rngData As Range
Set rngData = Range("Main[#All]")
With Sheets("Input")
Set rngCrit = .Range("A1", .Range("A" & Rows.Count).End(xlUp))
End With
rngData.AdvancedFilter Action:=xlFilterInPlace, CriteriaRange:=rngCrit, Unique:=True