# SEARCH function in Excel

> SEARCH returns the position of one piece of text inside another, ignoring upper and lower case, and it understands the ? and * wildcards.

Source: https://spreadsheetpractice.com/functions/search · Updated October 28, 2026 · Formulas and results on this page were run by the Spreadsheet Practice formula engine on November 20, 2026

## Quick answer

- **What it does:** SEARCH returns the position of one piece of text inside another, ignoring upper and lower case, and it understands the ? and * wildcards.
- **Syntax:** `=SEARCH(find_text, within_text, [start_num])`
- **Most common use:** `=SEARCH("mug",B2)` returns 9 (Finds "MUG" even though the case is different)
- **Available in:** Every current version
- **Category:** [Text functions](https://spreadsheetpractice.com/functions/category/text)
- **Returns:** A number: the position of the match, or #VALUE! if it isn't found.
- **Google Sheets:** Works the same in Google Sheets.

## What it does

SEARCH returns the position of one piece of text inside another, ignoring upper and lower case, and it understands the ? and * wildcards. Most people use it inside ISNUMBER to answer a simple question: does this cell contain that word?

## Syntax

`=SEARCH(find_text, within_text, [start_num])`

| Argument | Required? | What it is |
|---|---|---|
| `find_text` | Required | The text to look for. ? matches any one character and * any run of characters; put ~ in front to find the symbol itself. |
| `within_text` | Required | The text to search in. |
| `start_num` | Optional | Position to start searching from. Leave it out to start at 1. |

## Examples

Each result was calculated by running the formula on the sample sheet.

| Cell | Formula | Result | What it shows |
|---|---|---|---|
| C2 | `=SEARCH("mug",B2)` | 9 | Finds "MUG" even though the case is different |
| C3 | `=ISNUMBER(SEARCH("cold",B3))` | TRUE | TRUE because the description mentions cold |
| C4 | `=SEARCH("m?g",A4)` | 8 | A wildcard: ? stands for any single character |

### The sample sheet

Every formula above runs on this data:

|  | A | B | C |
|---|---|---|---|
| 1 | Product | Description | Result |
| 2 | Free shipping mug | Ceramic MUG, 12 oz | 9 |
| 3 | Steel water bottle | Keeps drinks cold | TRUE |
| 4 | Travel Mug Lid | Spare lid for travel mugs | 8 |

## Common mistakes

| What you see | Why, and how to fix it |
|---|---|
| #VALUE! when the text is missing | SEARCH returns an error, not 0. Use =ISNUMBER(SEARCH("x",A2)) for TRUE or FALSE, or IFERROR(SEARCH("x",A2),0). |
| It matches part of a word | SEARCH("cat",A2) also finds "category". Search for " cat " with spaces, or check the characters around the match, when you need whole words. |
| Searching for * or ? | They act as wildcards. Put a tilde in front to find the character itself: SEARCH("~?",A2). |

## Tips

- To count cells containing a word, =COUNTIF(A2:A100,"*delivery*") is shorter and also ignores case.

## Related functions

- [FIND](https://spreadsheetpractice.com/functions/find): FIND returns the position of one piece of text inside another, counting from 1.
- [ISNUMBER](https://spreadsheetpractice.com/functions/isnumber): ISNUMBER returns TRUE when a value is a real number, which includes dates and times.
- [COUNTIF](https://spreadsheetpractice.com/functions/countif): COUNTIF counts the cells in a range that meet one condition: tickets marked "Open", scores of 70 or more, product names containing "lamp".
- Comparison: [FIND vs SEARCH](https://spreadsheetpractice.com/functions/compare/find-vs-search)

## Questions

### How do I check if a cell contains specific text?

=ISNUMBER(SEARCH("text",A2)) returns TRUE if the text appears anywhere in the cell, in any case. Use FIND instead of SEARCH for a case-sensitive check.

### Does SEARCH support wildcards?

Yes. ? matches any single character and * matches any sequence of characters. FIND doesn't support them.

## Practice

A graded SEARCH exercise ("Flag reviews about delivery") is on [the SEARCH page](https://spreadsheetpractice.com/functions/search). It is checked instantly, then re-checked on changed data.

---

Spreadsheet Practice (https://spreadsheetpractice.com) teaches spreadsheet formulas by practice: every exercise is graded in a live grid and re-checked on changed data.
