🔝The InStr( ) function is a highly used function to find the location of one string within another.
There is an optional starting point.
In the above, the first parameter is 3 which says to start the search from the 3rd position offset from 1st. Note that in many language the first character is considered position 0. Some common usage: If Instr(s,"value") > 0 then ' exists Elseif Instr(s,"value") = 0 then ' string doesn't exist End If This Function is often used with the Mid function. There is a final parameter that tells the InStr( ) function what type of comparison to do
See Also |