Hi
Have a excel table with one column. the coding i have only allows exact match. for eg my column has first names and surnames. if i type, for eg , Robert Mortimer and then search i get a result. However if i only put in robert, i dont get a result. How can i do a partial search and only write in rob or robert but still get a result.
the VBA coding i am using is as follows
Sub Searchable_List_Simple()
Dim MainSheet As Worksheet
Dim MyTable As ListObject
Set MainSheet = Sheets("Main")
Set MyTable = MainSheet.ListObjects("MyTable")
UserInput = MainSheet.Range("B3").Value
FieldName = MainSheet.Range("D3").Value
If UserInput <> "" Then
MyTable.AutoFilter.ShowAllData
If FieldName = "APT" Then
MyTable.Range.AutoFilter Field:=1, Criteria1:=UserInput
End If
End If
End Sub
Thank you for assistance
Anthony