The FINDB function in Google Sheets is designed to locate the initial position of a specified string within a given text. Unlike its counterpart, FIND, FINDB accounts for double-byte characters, making it particularly useful for languages such as Chinese or Japanese, where characters can occupy more space. This function is essential for text analysis and manipulation within spreadsheets.
Syntax
FINDB(search_for, text_to_search, [starting_at])
- search_for: The string you want to find.
- text_to_search: The text in which you want to search for the string.
- [starting_at]: (Optional) The position in the text from which to start the search. Default is 1.
Example #1
FINDB("ap", "Ape Apple")
This function searches for the string “ap” in “Ape Apple” and returns the position 3 since it first appears in “Ape” (counting double characters, it recognizes the 1st position as “A”). The result is 4.
Example #2
FINDB("e", "Bee")
Here, the function finds the position of “e” in “Bee”. Because of the double-character “B”, it counts from there. Thus, the result is 3, marking the position of the letter “e”.
Example #3
FINDB("z", "Hello")
This example looks for the letter “z” in the word “Hello”. Since it cannot find it, the result will be an error, specifically a VALUE! error.
Error handling
- VALUE! This error occurs when the search string is not found in the text provided.
- NUM! This error appears if the starting position is less than 1 or exceeds the length of the text you’re searching in.