VBA Searching within strings for the presence of substrings Use InStr to find the position of the first instance of a substring


Example

Const baseString As String = "Foo Bar"
Dim containsBar As Boolean

Dim posB As Long
posB = InStr(1, baseString, "B", vbBinaryCompare)
'posB = 5