MS Excel: SEARCH Function (WS)

This Excel tutorial explains how to use the Excel SEARCH function with syntax and examples.

Description

The Microsoft Excel SEARCH function returns the location of a substring in a string. The search is NOT case-sensitive.

Syntax

The syntax for the Microsoft Excel SEARCH function is:
SEARCH( substring, string, [start_position] )

Parameters or Arguments

substring is the substring that you want to find.
string is the string to search within.
start_position is optional. It is the position in string where the search will start. The first position is 1.

Note

  • If the SEARCH function does not find a match, it will return a #VALUE! error.

Applies To

The SEARCH function can be used in the following versions of Microsoft Excel:
  • Excel 2013, Excel 2011 for Mac, Excel 2010, Excel 2007, Excel 2003, Excel XP, Excel 2000

Type of Excel Function

The SEARCH function can be used in Microsoft Excel as the following type of function:
  • Worksheet function (WS)

Example (as Worksheet Function)

Let's look at some Excel SEARCH function examples and explore how to use the SEARCH function as a worksheet function in Microsoft Excel:
Microsoft Excel
Based on the spreadsheet above, the following Excel SEARCH examples would return:
=SEARCH("bet", A1)
Result: 6

=SEARCH("BET", A1, 3)
Result: 6

=SEARCH("e", A2)
Result: 2

=SEARCH("e", A2, 1)
Result: 2

=SEARCH("e", A2, 3)
Result: 9

=SEARCH("in", A2, 6)
Result: #VALUE!

=SEARCH("cel", "Excel", 1)
Result: 3

Total Pageviews

2016 © BiztechCS
Planer theme by BiztechCS