How to use the FIND function in Excel
How to use the FIND function in Excel: The FIND function in Excel is used to locate a character within a text string. It serves a similar purpose to other string manipulation functions such as MID, LEFT, or RIGHT, but it has distinct differences. The FIND function automatically identifies the position of a character within a text string, whereas string manipulation functions require users to specify the number of characters and the position to extract. The following article will guide you on how to use the FIND function in Excel, along with some examples.
Structure of the FIND function
The FIND function in Excel is used to return the position of a character or substring within a text string.
The FIND function counts each character as one, regardless of whether it is a single byte or double byte, regardless of the default language setting.
Function syntax: =FIND(find_text, within_text, [start_num])
Where:
- Find_text: The character or substring you want to find. This is a required argument.
- Within_text: The text string to be searched. Typically, it is treated as a cell reference, but you can also enter the string directly into the formula.
- Start_num: An optional argument that specifies the character position to start the search. If not provided, Excel will start the search from the first character of the within_text string.
Note:
- The FIND function is case-sensitive and does not allow wildcard characters.
- The FIND function does not allow the use of substitution characters.
- If the find_text parameter contains multiple characters, the FIND function will return the position of the first character. For example, the formula FIND(“ap”, “happy”) returns 2 because “a” is the second character in the word “happy.”
- If there are multiple occurrences of the find_text within the within_text, only the position of the first occurrence will be returned. For example, FIND(“l”, “hello”) returns 3, which is the position of the first “l” in the word “hello.”
- If find_text is an empty string, the FIND function will return the position of the first character in the search string.
- The FIND function will return #VALUE! if any of the following cases occur:
- find_text does not exist within within_text.
- start_num exceeds the number of characters in within_text.
- start_num is 0 or a negative number.
How to use the FIND function in Excel
Example: Consider the following data table:
a. Find the position of the letter “T” in cell B2 Use the formula: =FIND(“T”, B2)
b. Find the position of the first occurrence of the number 0 in cell B2 Use the formula: =FIND(0, B2)
c. Find the position of the first occurrence of the number 0 starting from the 5th character in cell B2 Use the formula: =FIND(0, B2, 5)
d. Find the position of the substring “hộc” in cell C2 Use the formula: =FIND(“hộc”, C2)
Thus, the above article has guided you on how to use the FIND function to locate the position of a character in Excel. Good luck!