0
0
ExcelHow-ToBeginner ยท 3 min read

How to Use SEARCH Function in Excel: Simple Guide

The SEARCH function in Excel finds the position of one text string inside another, returning the number where the text starts. It is case-insensitive and can be used to locate words or characters within a cell. Use =SEARCH(find_text, within_text, [start_num]) to apply it.
๐Ÿ“

Syntax

The SEARCH function has three parts:

  • find_text: The text you want to find.
  • within_text: The text or cell where you want to search.
  • start_num (optional): The position to start searching from (default is 1).

The function returns the position number where find_text first appears in within_text. If not found, it returns an error.

excel
=SEARCH(find_text, within_text, [start_num])
๐Ÿ’ป

Example

This example shows how to find the position of the word "apple" in a sentence.

excel
=SEARCH("apple", "I like apple pie")
Output
8
โš ๏ธ

Common Pitfalls

Common mistakes include:

  • Using SEARCH with case sensitivity (it is case-insensitive, so use FIND if case matters).
  • Not handling errors when the text is not found, which causes #VALUE! error.
  • Forgetting the optional start_num when you want to search after a certain position.

To avoid errors, wrap SEARCH in IFERROR like this:

excel
=IFERROR(SEARCH("apple", A1), "Not found")
๐Ÿ“Š

Quick Reference

ParameterDescription
find_textText you want to find
within_textText or cell to search in
start_numOptional start position for search (default 1)
โœ…

Key Takeaways

SEARCH finds the position of text inside another text, ignoring case.
Use the optional start_num to begin searching from a specific position.
Wrap SEARCH in IFERROR to handle cases when text is not found.
SEARCH is case-insensitive; use FIND for case-sensitive search.
SEARCH returns the position number where the text starts.