Saturday, July 23, 2016

SEARCH Function

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 SEARCH function in Microsoft Excel is:
SEARCH( substring, string, [start_position] )

Parameters or Arguments

substring
The substring that you want to find.
string
The string to search within.
start_position
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

  • Excel 2016, Excel 2013, Excel 2011 for Mac, Excel 2010, Excel 2007, Excel 2003, Excel XP, Excel 2000

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 Excel spreadsheet above, the following 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

No comments:

Post a Comment