SEARCH/SEARCHB Function
The SEARCH/SEARCHB function is one of the text and data functions. Is used to return the location of the specified substring in a string. The SEARCH function is intended for languages that use the single-byte character set (SBCS), while SEARCHB - for languages that use the double-byte character set (DBCS) like Japanese, Chinese, Korean etc.
Syntax
SEARCH(find_text, within_text, start_num)
SEARCHB(find_text, within_text, start_num)
The SEARCH/SEARCHB function has the following arguments:
| Argument | Description |
|---|---|
| find_text | The substring to find. |
| within_text | The string to search within. |
| start_num | The position to start searching from. It is an optional argument. If it is omitted, the function will perform the search from the beginning of within_text. |
Notes
The SEARCH/SEARCHB function is NOT case-sensitive.
If the function does not find the matches, it will return a #VALUE! error.
How to apply the SEARCH/SEARCHB function.
Examples
The figure below displays the result returned by the SEARCH function.
