When you need to check for the presence or position of a substring within a string, VBA offers the InStr and InStrRev functions that return the character position of the substring in the string, if it is present.
Searching within strings for the presence of substrings Related Examples