I have a macro in Excel that filters my table when it is activated by a button.
This is the macro:
Sub Macro2()
'
' Macro2 Macro
'
ActiveSheet.ListObjects("Table1").Range.AutoFilter Field:=2, Criteria1:= _
Range("D1").Value
End Sub
The macro is filtering the table using the field 2 and the value on D1 cell.
How do I make it use the * wildcard?
For example, if the name is Maria Doe
and the cell is Maria
it won't show in filter. But if the cell is Maria*
it will show in filter.
I think the issue has to do with the criteria:=
parameter, but I'm not sure how to set it.