# SEARCH in Google Sheets: syntax and examples

URL: https://goingstellar.ro/reference/sheets/search/

SEARCH returns the position where a piece of text first appears inside another text, counting from 1. The match ignores case and accepts the wildcards * and ?. When nothing is found it returns #VALUE!, so wrap it in ISNUMBER or IFERROR.

## Syntax

```
SEARCH(search_for, text_to_search, [starting_at])
```

## Arguments

- `search_for` (text, required: yes): The text to find. It may contain * (any run of characters) and ? (one character).
- `text_to_search` (text, required: yes): The text to look in.
- `starting_at` (number, required: no): Position to start from, counted from 1. Default is 1.

## Examples

The examples use this table, starting in A1:

| Order | Note |
|---|---|
| INV-2041-RO | Urgent: call the client |
| inv-2042-bg | Refund approved |
| INV-2043-RO | Ship on Monday |

```
=SEARCH("-", A2)
```

Result: `4`

Position of the first hyphen in an order code. Run in a Google Sheet (English US locale) on 2026-11-29.

```
=SEARCH("ro", A2)
```

Result: `10`

The match ignores case: lowercase "ro" finds the uppercase RO at the end. Run in a Google Sheet (English US locale) on 2026-11-29.

```
=SEARCH("c*t", B2)
```

Result: `9`

Wildcard: from a c up to the next t. Run in a Google Sheet (English US locale) on 2026-11-29.

```
=SEARCH("-", A2, 5)
```

Result: `9`

Start at position 5 to find the second hyphen. Run in a Google Sheet (English US locale) on 2026-11-29.

```
=ISNUMBER(SEARCH("refund", B3))
```

Result: `TRUE`

A yes or no test: a number means found, an error means not found. Run in a Google Sheet (English US locale) on 2026-11-29.

## Common errors

- Not found gives #VALUE!, not 0. Test with ISNUMBER(SEARCH(...)) or wrap in IFERROR.
- * and ? are wildcards. SEARCH("?", A2) matches the first character. To look for a literal one, write ~? or ~*.
- starting_at below 1 or past the end of the text returns #VALUE!.
- The match ignores case. When case matters, use FIND, which is case-sensitive and has no wildcards.

## Compared with Excel

Same syntax and behavior as Excel SEARCH, wildcards included.

## Questions and answers

### What is the difference between SEARCH and FIND?

SEARCH ignores case and understands wildcards. FIND is case-sensitive and treats * and ? as plain characters.

## Related functions

- [FIND](https://goingstellar.ro/reference/sheets/find/)
- [LEFT](https://goingstellar.ro/reference/sheets/left/)
- [MID](https://goingstellar.ro/reference/sheets/mid/)
- [REGEXMATCH](https://goingstellar.ro/reference/sheets/regexmatch/)
- [SUBSTITUTE](https://goingstellar.ro/reference/sheets/substitute/)
- [LEN](https://goingstellar.ro/reference/sheets/len/)

## Sources

- [SEARCH (Docs Editors Help)](https://support.google.com/docs/answer/3094154)

