# SEARCHB

## Content

This function searches one text value within another and returns the text value’s position in the text you searched.

## Syntax

`SEARCHB(find_text, within_text, [start_num])`

## Arguments

This function has the following arguments:

| **Argument** | **Description** |
| -------- | ----------- |
| *find\_text* | The text that you want to find. |
| *within\_text* | The text in which you want to search for *find\_text*. |
| *start\_num* | [Optional] The byte position in *within\_text* at which to start the search. The first byte is position 1. <br>If omitted, the search starts from the first byte. |

## Remarks

* `SEARCHB` counts each double-byte character as 2 bytes when a language that supports a double-byte character set (DBCS) is used. Otherwise, `SEARCHB` behaves in the same way as `SEARCH`.
* The function is not case-sensitive. Use the `FINDB` function to perform a case-sensitive search.
* You can use the question mark (`?`) and asterisk (`*`) wildcard characters in *find\_text*. A question mark matches any single character, and an asterisk matches any sequence of characters.
* To search for an actual question mark or asterisk, type a tilde (`~`) before the character.
* If *find\_text* is not found, the function returns the `#VALUE!` error.
* If *start\_num* is less than or equal to 0 or greater than the byte length of *within\_text*, the function returns the `#VALUE!` error.

## Examples

```JavaScript
activeSheet.setFormula(0, 0, '=SEARCHB("MOB","MOBILE")');// 1
activeSheet.setFormula(0, 0, '=SEARCHB("B","MOBILE")');// 3
activeSheet.setFormula(1, 0, '=SEARCHB("B","MOBILE",4)');// #VALUE!
```