fxExcelReps
← All functions Aa Text · Advanced

SEARCH The position of text inside text (any case).

How to use SEARCH in Excel

SEARCH works like FIND but ignores case and supports wildcards (*, ?). Wrapped in ISNUMBER it answers "does this text contain…?".

Syntax

=SEARCH(find_text, within_text, [start_num])

find_textWhat to look for (wildcards allowed).
within_textWhere to look.
[start_num]Where to start.

Examples

=SEARCH("shirt", A2)Position of "shirt", any case.
=ISNUMBER(SEARCH("red", A2))TRUE if A2 contains "red".
=IF(ISNUMBER(SEARCH("urgent", B2)), "!", "")Flag urgent tickets.

Categorise transactions by their description

Bank statements describe payments in free text. SEARCH finds a keyword whatever the case, and IF turns it into a category.

=IF(ISNUMBER(SEARCH("salary", B2)), "Income", "Other")Marks every salary payment.
=IFS(ISNUMBER(SEARCH("rent", B2)), "Rent", ISNUMBER(SEARCH("fuel", B2)), "Transport", TRUE, "Other")Several categories, checked in order.

Wildcards inside SEARCH

? stands for any one character and * for any number of them. To look for a real question mark or asterisk, put a tilde in front: ~?.

=ISNUMBER(SEARCH("inv*2026", B2))TRUE for "Invoice 15/2026" and "INV-2026-07".
=SEARCH("~?", B2)The position of a real question mark.

Count or add up by a keyword

For a whole column, COUNTIF and SUMIF with * do the same job as SEARCH, without a helper column.

=COUNTIF(B2:B500, "*fuel*")How many payments mention fuel.
=SUMIF(B2:B500, "*fuel*", C2:C500)How much was spent on fuel.

Common mistakes

#VALUE! when not found
Use ISNUMBER(SEARCH(...)) to get TRUE/FALSE instead.
Searching for * or ?
Put a tilde before them: "~*".

Frequently asked questions

Is SEARCH case-sensitive?

No. "Salary", "SALARY" and "salary" all match. For a case-sensitive search use FIND.

Why does SEARCH return #VALUE!?

The text isn't in the cell. That's normal, so wrap SEARCH in ISNUMBER to get TRUE or FALSE, or in IFERROR to show your own value.

How do I check if a cell contains one of several words?

Add up one ISNUMBER(SEARCH()) per word: =ISNUMBER(SEARCH("rent", B2))+ISNUMBER(SEARCH("lease", B2))>0.

Can I use SEARCH in conditional formatting?

Yes. Choose Use a formula to determine which cells to format and enter =ISNUMBER(SEARCH("urgent", $B2)) to highlight every row that mentions urgent.

Available in: All versions of Excel, Excel for the web, Google Sheets

Related functions

FINDISNUMBERCOUNTIFIF

↑ Practise SEARCH in the sheet above