How to Use SEARCHB Function

The SEARCHB function is to search a text string from another and returns the location in the second text string. When a double-byte character set (DBCS, e.g., Japanese, Simplified Chinese, Traditional Chinese and Korean) is set as the default language, each character will be counted as 2 bytes. Otherwise, SEARCHB function is the same as SEARCH function.

Formula:

=SEARCHB(find_text,within_text,[start_num])

Explanations:

– Find_text is required, the text string that you need to find;

– Within_text is required, the second text string that contains "Find_text";

– [Start_num] is optional, the starting point that you start your search. When it is omitted, it is assumed to be 1.

Cautions:

– When [Start_num] is less than 1, returns #VALUE! error;

– If "Within_text" does not contain "Find_text", the result returns #VALUE! Error;

– If [Start_num] has decimals, only integer portion will be extracted;

– The SEARCHB function is not case sensitive, so please refer to FINDB function when you do case sensitive search.

Example 1: What is the position of the first letter "s" in the text string "How to use SEARCHB function"?

=SEARCHB ("s", B1)

The first "s" in the string "How to use SEARCHB function" is at the 9th position.

Example 2: What is the position of 2nd letter "s" in the text string "How to use SEARCHB function"?

=SEARCHB ("s", B1, 10)

The 2nd "s" in the string "How to use SEARCHB function" is at the 12th position.

Download: SEARCHB Function

Leave a Reply