Table of Contents
The SEARCHB function in Google Sheets is a useful tool for finding specific text within a cell or range of cells. It allows you to specify a keyword or phrase to search for, and returns the starting position of that text within the cell. This function is particularly helpful when dealing with non-English languages, as it takes into account the double-byte characters used in these languages. To use the SEARCHB function, simply enter the formula “=SEARCHB(keyword, cell)” into a cell, replacing “keyword” with your desired text and “cell” with the cell you want to search within. This will return the position of the first occurrence of the keyword within the cell.
SEARCHB
Sample Usage
SEARCHB("新", "农历新年", 2)
Syntax
SEARCHB(search_for, text_to_search, [starting_at])
search_for– The string to look for withintext_to_search.text_to_search– The text to search for the first occurrence ofsearch_for.starting_at– [ OPTIONAL –1by default ] – The character position withintext_to_searchat which to start the search.
Notes
- If
search_foris not found, the #VALUE! error value is returned. - Ensure that
search_forandtext_to_searchare not supplied in reverse order, or the #VALUE! error will likely be returned. The arguments are supplied in a different order than other text functions such asSPLITandSUBSTITUTE. - It’s recommended to use a function such as
IFERRORto check for cases when there aren’t matches to the search. - You can use the wildcard characters: question mark (?) and asterisk (*), in
search_for. A question mark matches any single character; an asterisk matches any sequence of characters. If you want to find an actual question mark or asterisk, type a tilde (~) before the character, or seeFINDB. - Use
SEARCHfor standard character sets, andSEARCHBfor double-byte character sets such as Japanese, Chinese (Simplified), Chinese (Traditional), and Korean.
See Also
SEARCH: Returns the position at which a string is first found within text, ignoring case.
REPLACE: Replaces part of a text string with a different text string.
REGEXREPLACE: Replaces part of a text string with a different text string using regular expressions.
REGEXMATCH: Whether a piece of text matches a regular expression.
SUBSTITUTE: Replaces existing text with new text in a string.
SPLIT: Divides text around a specified character or string, and puts each fragment into a separate cell in the row.
FIND: Returns the position at which a string is first found within text, case-sensitive.
FINDB: Returns the position at which a string is first found within text counting each double-character as 2.
Cite this article
stats writer (2024). ? How do I use the SEARCHB function in Google Sheets?. PSYCHOLOGICAL SCALES. Retrieved from https://scales.arabpsychology.com/stats/how-do-i-use-the-searchb-function-in-google-sheets/
stats writer. "? How do I use the SEARCHB function in Google Sheets?." PSYCHOLOGICAL SCALES, 1 Jul. 2024, https://scales.arabpsychology.com/stats/how-do-i-use-the-searchb-function-in-google-sheets/.
stats writer. "? How do I use the SEARCHB function in Google Sheets?." PSYCHOLOGICAL SCALES, 2024. https://scales.arabpsychology.com/stats/how-do-i-use-the-searchb-function-in-google-sheets/.
stats writer (2024) '? How do I use the SEARCHB function in Google Sheets?', PSYCHOLOGICAL SCALES. Available at: https://scales.arabpsychology.com/stats/how-do-i-use-the-searchb-function-in-google-sheets/.
[1] stats writer, "? How do I use the SEARCHB function in Google Sheets?," PSYCHOLOGICAL SCALES, vol. X, no. Y, ص Z-Z, July, 2024.
stats writer. ? How do I use the SEARCHB function in Google Sheets?. PSYCHOLOGICAL SCALES. 2024;vol(issue):pages.
