Dim string1 = "631;27;73"
Dim string2 = "31"
InStr(string1, string2) returns 2 since 31 is a subset of string1.
For my current scenario, I want to match the whole number. string2 = 31 is not a matching number in string1 and hence I want to return a zero and append 31 to string1.
string1at semicolons and compare the substrings withstring2in a loop, or b) use a regular expression where you match on word boundaries (\b).