Google Sheets SEARCHB Function

This post will guide you how to use Google Sheets SEARCHB function with syntax and examples.

Description


The Google Sheets SEARCHB function returns the number of the starting location of a substring in a text string counting each double-character as 2. You can use the SEARCHB function to locate a text string within another text string and returns the position of the first character of find_text within text.

The SEARCHB function can be used to calculate the position at which a string is first found within text counting each double-character as 2 in google sheets.  The purpose of this function is to get the location of text in the given string. And it’s returned value as a number representing the location of finding text.

The SEARCHB function is a build-in function in Google Sheets and it is categorized as a Text Function.

Syntax


The syntax of the SEARCHB function is as below:

= SEARCHB(find_text, within_text,[start_num])

Where the SEARCHB function arguments are:

  • find_text -This is a required argument. The substring that you want to find
  • within_text -This is a required argument. The text string in which you want to search for the substring (find_text).
  • Start_num -This is an optional argument. The starting position to search.

Note:

  • The SEARCHB function will return the position of a find_text inside another text string. And if there is more than one occurrence of the find string, and the SEARCHB function returns the position of the first occurrence.
  • If find_text string is not found, the SEARCHB function will return the #VALUE! Error value.
  • When find text string is empty, the SEARCHB function will return 1.
  • If start_num value is omitted, it is set to be 1 by default.
  • The SEARCHB function is not case-sensitive. For example, “google” will match “GOOGLE”. If you wish to compare text where case matters, and you can use the FIND function.
  • The SEARCHB function support wildcard characters.
  • you can use another function called IFERROR function in combination with the SEARCHB function to check for cases when there are any matches to the search.
  • Using SEARCH function for standard character sets and SEARCHB function for double-byte character sets such as Chinese, Japanese, and Korean.

Google Sheets SEARCHB Function Examples


The below examples will show you how to use google sheets SEARCHB function to get the position of substring in a text string.

#1 To get the position of “google” text string in B1 cell, starting at the second position, just using formula:

= SEARCHB(“google”,B1,2) //it returns 7

google sheets searchb function

#2 The search function use wildcard characters to look for a string starts with “go” characters in cell B1, using the following formula:

=SEARCHB(“go*”,B1,1) //it returns 7

google sheets searchb function

#3 #VALUE! Error will be returned if find_text string is not found in with_text:

=SEARCH(“test”,”google”,1)   //it returns #VALUE!

google sheets searchb function

#4 to get the position of a double-byte character sets “新“ within another Chinese text string, using the following formula:

=SEARCHB("新", "农历新年", 2) //it returns 5

google sheets searchb function

 

 

 

 

 

Related Posts

Google Sheets EVEN Function
google sheets even function1

This post will guide you how to use Google Sheets EVEN function with syntax and examples. Description The Google Sheets EVEN function rounds a given number up to the nearest even integer. You can use the EVEN function to return ...

Google Sheets COUNTBLANK Function
google sheets countblank function1

This post will guide you how to use Google Sheets COUNTBLANK function with syntax and examples. Description The Google Sheets COUNTBLANK function use to count the number of empty cells in a range of cells. You can use the COUNTBLANK ...

Google Sheets DEGREES Function
google sheets degrees function1

This post will guide you how to use Google Sheets DEGREES function with syntax and examples. Description The Google Sheets DEGREES function converts radians into degrees. And it will return a numeric value. For examples, if you pass the PI() function into ...

Google Sheets COSH Function
google sheets cosh function1

This post will guide you how to use Google Sheets COSH function with syntax and examples. Description The Google Sheets COSH function returns the hyperbolic cosine of a given angle. The purpose of this function is used to get hyperbolic ...

Google Sheets COS Function
google sheets cos function1

This post will guide you how to use Google Sheets COS function with syntax and examples. Description The Google Sheets COS function returns the cosine of a given angle. If you want to supply an angle to COS function in ...

Google Sheets COMBINA Function
google sheets combina function1

This post will guide you how to use Google Sheets COMBINA function with syntax and examples. Description The Google Sheets COMBINA function returns the number of combinations for a given number of items and it includes repetitions. You can use ...

Google Sheets COMBIN Function
google sheets combin function1

This post will guide you how to use Google Sheets COMBIN function with syntax and examples. Description The Google Sheets COMBIN function returns the number of combinations for a given number of items. And you can use the COMBIN function ...

Google Sheets CEILING.PRECISE Function
google sheets ceiling.precise function1

This post will guide you how to use Google Sheets CEILING.PRECISE function with syntax and examples. Description The Google Sheets CEILING.PRECISE function returns a given number rounded up to the nearest multiple of a given number of significance or returns ...

Google Sheets CEILING Function
google sheets ceiling function1

This post will guide you how to use Google Sheets CEILING function with syntax and examples. Description The Google Sheets CEILING function returns a given number rounded up to the nearest multiple of a given number of significance. You can ...

Google Sheets ATANH Function
google sheets atanh function1

This post will guide you how to use Google Sheets ATANH function with syntax and examples. Description The Google Sheets ATANH function returns the inverse hyperbolic tangent of a given number. So you can use the ATANH function to calculate ...

Sidebar