WorksheetFunction.SearchB (Excel)

Search and SearchB locate one text string within a second text string, and return the number of the starting position of the first text string from the first character of the second text string.

Search is intended for use with languages that use the single-byte character set (SBCS), whereas SearchB is intended for use with languages that use the double-byte character set (DBCS). The default language setting on your computer affects the return value in the following way:

SearchB (Arg1, Arg2, Arg3)

Dim strArg1 As String: strArg1 = 
Dim strArg2 As String: strArg2 = 
Dim dblSearchB As Double
dblSearchB = WorksheetFunction.SearchB(Arg1:=strArg1, Arg2:=strArg2)


Arg1, Arg2, Arg3

Arg1 (String) - Find_text - the text that you want to find.

Arg2 (String) - Within_text - the text in which you want to search for find_text.

Arg3 - Start_num - the character number in within_text at which you want to start searching