In this code, I'm trying to check if the input entered by user (txtList) can be found in a list of data (txtList). The following code returns 0 (substring not found although "John Ho" and "Ho Tee Nee, John" is the exact same person. Can someone please enlighten me on how to resolve this?
'code returns 0 (substring not found)
Dim txtList As String, txtInput As String
txtList = "Ho Tee Nee, John"
txtInput = "John Ho"
Debug.Print InStr(1, txtList, txtInput, vbTextCompare)