FIND
Information Functions
Basic Description
The Excel FIND function returns the position of a specified character or sub-string within a supplied text string.
The function is case-sensitive. If you want to perform a non-case-sensitive search, use the Excel Search function instead.
The syntax of the Find function is :
Where the function arguments are:
find_text | - | The character or text string that you wish to find. |
within_text | - | The text string that is to be searched. |
[start_num] | - |
An optional argument that specifies the position of the character from which the search should begin. If omitted, this takes on the default value of 1 (i.e. begin the search at the start of the within_text string) |
If the supplied find_text is found, the Find function returns a number, representing the position of the find_text in the within_text. If the supplied find_text is not found, the Excel #VALUE! error is returned.
Find Function Examples
The following spreadsheet shows examples of the Excel Find function used to find various characters in the text string "Original Text".
Formulas:
|
Results:
|
Note that, in the above examples:
- Due to the case-sensitivity of the Find function, the upper- and lower-case find_text values, "T" and "t", return different results (see cells B1 & B2).
- In cell B4, the [start_num] argument is set to 4. Therefore the search begins at the fourth character of the within_text string and so returns position 5 as the position for the character "i".
Example 2 - Use of the Find Function to Show Cells Containing Specific Text
Formulas:
|
||||||||||||||||||||||||
Results:
|
The above example uses the Excel Find function to highlight cells containing a specific text string.
The example spreadsheet lists employees of a company, alongside a list of skills. The Find function is used in columnn C, to pick out the members of staff who have the skill '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 the #VALUE! error.
Tidying Up Your Result
You might want to tidy up the results of the Find function in the example above. This can be done using the Excel If and Iserror functions. For example, the formula in cell C2 could be written as
This would return the value 1 if the text "Typing" was found in cell B2 and 0 otherwise.
Further information and examples of the Excel Find function can be found on the Microsoft Office website.
Excel Find Function Error
If you get an error from the Excel Find function this is likely to be the #VALUE! error:
Common Error
#VALUE! | - |
Occurs if either:
|