How to Use the SEARCH Function in Excel

The SEARCH function in Excel helps you find the position of specific text within another text string. Instead of returning the text itself, SEARCH returns the character number where the text begins.

This function is especially useful when working with product codes, email addresses, customer records, file names, and other text-based data. Because SEARCH is not case-sensitive, it can locate text regardless of whether it appears in uppercase or lowercase letters.

In This Guide, You’ll Learn

  • What the SEARCH function does
  • The syntax and arguments of SEARCH
  • How to find text within a cell
  • How to extract information using SEARCH
  • Common SEARCH errors and how to avoid them
  • Real-world business uses for SEARCH

What is the SEARCH Function?

The SEARCH function returns the starting position of one text string within another text string.

Unlike the FIND function, SEARCH is not case-sensitive and supports wildcard characters.

SEARCH Function Syntax

Argument Definitions

  • find_text – The text you want to locate.
  • within_text – The text string that contains the text you are searching for.
  • start_num (optional) – The character position where Excel should begin searching.

Example Dataset Used in This Tutorial

You can download the sample data we’ll be using in this tutorial by clicking on this link—> SEARCH Function Data

Basic SEARCH

Suppose you want to find the position of the word “Excel” inside a sentence.

Formulas Used

How This Formula Works

  • Excel searches for the word “Excel”
  • The word begins at character 7
  • The formula returns 7

SEARCH is Not Case-Sensitive

One of the biggest differences between SEARCH and FIND is that SEARCH ignores letter casing.

Formulas Used

How This Formula Works

  • Excel searches for the word “excel”
  • The word begins at character 7
  • The formula returns 7

Finding the @ Symbol in an Email Address

A common business use is locating symbols within text.

Formulas Used

How This Formula Works

  • SEARCH looks for the @ symbol
  • It begins at character 11
  • This technique is often used when extracting usernames or domains from email addresses

Extracting Text Before an Email Domain

SEARCH is often combined with LEFT, RIGHT, and MID functions.

Formulas Used

How This Formula Works

  • SEARCH looks for the 123
  • It begins at character 9

Common SEARCH Errors

#VALUE! Error

This error occurs when SEARCH cannot find the specified text.

To avoid this, wrap SEARCH inside IFERROR.

=IFERROR(SEARCH("Excel",A2),"Not Found")

SEARCH vs FIND

FeatureSEARCHFIND
Case-sensitiveNoYes
Supports wildcardsYesNo
Returns position numberYesYes
Searches text stringsYesYes

Use SEARCH when capitalization does not matter and when wildcard matching is needed.

Use FIND when capitalization is important.

Example Dataset Used in This Tutorial

You can download the sample data we’ll be using in this tutorial by clicking on this link—> SEARCH Function Data

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *