The SEARCH function returns the number of a specific character at the position starting from start_num where the specific character or text string is first found.
Use SEARCH to determine the position of characters or text strings within other text strings so that you can use the MID or REPLACE function to change the text.
SyntaxSEARCH(find_text,within_text,start_num)
Find_text is the text to find. You can use wildcard characters in find_text, including question mark (?) and asterisk (*). Question mark can match any single character, and asterisk can match any string of characters. If you want to find a real question mark or asterisk, type a tilde (~) before the character.
Within_text is the text within which find_text is to be found.
Start_num is the number of the character in within_text where the search begins.
Notes
- SEARCH is not case-sensitive when finding text.
- SEARCH is similar to FIND, but FIND is case-sensitive.
- If find_text is not found, the error value #VALUE! is returned.
- If start_num is omitted, it is assumed to be 1.
- If start_num is not greater than 0 (zero) or greater than within_text, the error value #VALUE! is returned.
The SEARCH function is a search function that returns the position of the first occurrence of a specified character or text string in the string.
Give an example to help everyone understand this function.
Suppose we want to find the first occurrence of the word "No" in cell (A2).
First select cell (A5), click Insert Function, find the SEARCH function, and click OK.
Here, we need to fill in three values and enter "No" in the search string. Because we are searching in cell (A2), the searched string is filled in (A2). The starting position refers to the character from which we start searching. If left blank, it defaults to 1.
Assuming we start searching from the first character, we can see that the result shows that the first occurrence of the word "No" is at the second position of (A2).
Suppose we start searching from the 3rd character, change the starting character to 3, click OK, and we find that the result displays "4".
This is because the scope of our search has changed to after the third word of "Do you know? It should be green, fat, red and thin", so the position of the first occurrence of "no" found has changed to the fourth word in the text Location. This function is a basic function and is often used in combination with other functions. You must learn it.
Articles are uploaded by users and are for non-commercial browsing only. Posted by: Lomu, please indicate the source: https://www.daogebangong.com/en/articles/detail/Excel-zhong-SEARCH-han-shu-de-yong-fa-ding-wei-wen-ben-zhong-de-te-ding-zi-fu.html
评论列表(196条)
测试