ExcelFunctions.net Logo

The Excel FIND Function

Home » Excel-Built-In-Functions » Excel-Find-Function

Search this site:
Custom Search

Basic Description

The Excel FIND function returns the position of a specified character or string within a supplied text string. The function is case-sensitive.

The format of the function is:

FIND(find_text, within_text, [start_num])

where the arguments are as follows:

find_text the character or string that you wish to find
within_text the original text, that should be searched
start_num the character number from which the search should begin

Note: This function is case-sensitive. If you want a non-case-sensitive search, try the SEARCH function.

The FIND function will return an error if the supplied find_text is not found. If the supplied find_text is found, the function returns a number, representing the position of the find_text in the within_text string.

Example

The following example shows the Excel FIND function applied to the values in cells B1 - B4 of the example spreadsheet.

A B C
1 'FIND' an upper case "T", with the start_num
argument unspecified (default value = 1):
Original Text =FIND("T",B1)
2 'FIND' a lower case "t", with the start_num
argument unspecified (default value = 1):
Original Text =FIND("t",B2)
3 'FIND' a lower case "i", with the start_num
argument unspecified (default value = 1):
Original Text =FIND("i",B3)
4 'FIND' a lower case "i", with the start_num
argument set to 4
Original Text =FIND("i",B4, 4)

The results of the 4 calls to 'FIND' are shown in the spreadsheet below.

A B C
1 'FIND' an upper case "T", with the start_num
argument unspecified (default value = 1):
Original Text 10
2 'FIND' a lower case "t", with the start_num
argument unspecified (default value = 1):
Original Text 13
3 'FIND' a lower case "i", with the start_num
argument unspecified (default value = 1):
Original Text 3
4 'FIND' a lower case "i", with the start_num
argument set to 4
Original Text 5

Note that, due to the case-sensitivity of the FIND function, the use of this function to find "T" and the use of the function to find "t" return different results.

Also note the fourth example (in cell C4), in which the start_num is set to 4. In this case the search begins at the fourth character of the within_text string. Therefore, the result returned is position 5.

Example 2 - Use FIND to Pick Out Cells Containing Specific Text

The following example shows the Excel FIND function used to highlight cells containing a specific text string.

Imagine you have a spreadsheet showing members of staff alongside a list of skills. You want to pick out the rows containing members of staff who have typing skills. One way to do this is to use the FIND function to look for the word "Typing" in the 'Skills' column. This is shown in the spreadsheet below.

A B C
1 Name Skills Typing
2 Jane SMITH Shorthand, Typing, Visual Basic, Excel =FIND(C$1,B2)
3 Julie KENNEDY Presentation Skills, Management Training =FIND(C$1,B3)
4 DOMINIC TAYLOR Microsoft Office, typing =FIND(C$1,B4)
5 James COOPER Typing, HTML Programming =FIND(C$1,B5)

Note that, in the example above, the find_text is set to C$1, (ie. the string "Typing").

When the string "Typing" is found, the function returns the position of the start of this string within the searched cell. If the string "Typing" is not found, the function returns an error.
Note:
The $ symbol used in the term C$1 in the example above prevents the reference to cell C1 from automatically changing to C2, C3, etc as the formula is copied down to other cells.



A B C
1 Name Skills Typing
2 Jane SMITH Shorthand, Typing, Visual Basic, Excel 12
3 Julie KENNEDY Presentation Skills, Management Training #VALUE!
4 DOMINIC TAYLOR Microsoft Office, typing #VALUE!
5 James COOPER Typing, HTML Programming 1


In the example above, the function fails to 'FIND' the string "typing" within cell B4. This is because the FIND function is case sensitive. If you need to do a non-case-sensitive search, you should use Excel's SEARCH function.

You might want to tidy up the results of the FIND function in the example above. This can be done using the IF and ISERROR functions. For example, the formula in cell C2 could be written as

=IF(ISERROR(FIND(C$1, B2)),0,1)


This would return the value "1" if the text "Typing" was found in cell B2 and "0" otherwise.







Related Function :


Disclaimer Privacy Policy

Copyright © 2008-2010 ExcelFunctions.net