Function · Text

Excel SEARCH function

The Excel SEARCH function finds text and ignores case. The letters tx start at character 9 of Austin, TX 78701.

All current Excel versions. Also in Excel for the web and Google Sheets.

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

SEARCH
=SEARCH("tx","Austin, TX 78701")

Arguments

NameRequiredWhat to pass
find_textRequiredThe text to look for. Case is ignored. * and ? are wildcards. A tilde before them searches for the character itself.
within_textRequiredThe text to search.
start_numOptionalWhere to start. The default is 1.

Examples

Find the state abbreviation regardless of case

=SEARCH("tx",B1)

Result 9

=SEARCH("tx",B1)B2
Address
AB
1AddressAustin, TX 78701
2Position of tx9
A picture of the sheet, not a live calculator. Characters 1 to 6 are Austin, 7 is the comma, 8 is the space, 9 is T.

SEARCH is FIND without the case check, and with wildcards. tx matches TX in Austin, TX 78701. The match starts at character 9: six letters of Austin, the comma, the space, then T. FIND with the lowercase letters would have returned #VALUE! on this cell.

Use SEARCH when people type state codes in either case. Use FIND when case is part of the data, such as a product code where a12 and A12 are different. Both functions return a position, not the matched text. MID, starting at that position, pulls the characters out.