SEARCH () and SEARCHB () functions in Excel
The SEARCH () function and the SEARCHB () function are two functions that help you process strings in Excel. When you need to find the starting position of a substring in a text string without case or case, you use the SEARCH () or SEARCHB () function.
The following article describes the syntax and usage of the SEARCH () and SEARCHB () functions in Excel.
Description
The SEARCH () and SEARCHB () functions search and position one substring string in another. Returns the result that is the starting position of the substring from the first character in another text string.
The SEARCHB () function counts 2 bytes per character when one of the languages that supports BDCS is used as the default language, otherwise the SEARCH function will count 1 byte per character.
Syntax
= SEARCH (find_text, within_text, [start_num])
= SEARCHB (find_text, within_text, [start_num]))
Inside:
- find_text: is the character, text that you want SEARCH () to find.
- within_text: text, string for you to find find_text.
- start_num: start position within within_text.
Note
- Search SEARCH () and SEARCHB () search are not case-sensitive.
- Start_num omitted will have the default value of 1.
- If start_num is less than 0 or greater than the length of within_text, the function returns the error value.
- If no value is found find_text will return an error value.
- You can use the wildcards: question mark (?) And asterisk (*) in find_text argument.
- Use start_num to skip a specified number of characters. The function always returns the number of characters from the first character of within_text, if start_num is greater than 1 the function will count the number of characters you ignore.
For example
- Find the character "p" in the string within_text starting at the 3rd position.
- Find the word "mem" in the string within_text.
In addition, you can combine with other functions if you want to replace the searched words such as REPLACE () and REPLACEB () to replace the text that has just been located, or use the MID () and MIDB () functions. to return the recently positioned text.
For example: Replace "mem" in string within_text with "arc".
Apply the formula: = REPLACE (C6, SEARCH (B7, C6), 3, "arc") .
So you know the syntax and usage of the SEARCH () and SEARCHB () functions. Depending on the different string handling requirements, you apply the SEARCH () function, the SEARCHB () function, or combine it with another function to get the most effect. Good luck!
You should read it
- Summary of trigonometric functions in Excel
- How to use the Search function in Excel
- How to fix the SUM function doesn't add up in Excel
- Complete financial functions in Excel you should know
- MS Excel - Lesson 5: Excel formulas and functions
- How to use Hlookup function on Excel
- Summary of information functions in Excel
- Instructions for searching and replacing in Excel tables
- Comparison functions in Excel - How to use comparison functions and examples using comparison functions
- Date time functions in Excel
- Syntax and description of search and reference functions in Excel
- 10 EXCEL functions that ACCOUNTERS often use
Maybe you are interested
How to use the file search command on Windows, find saved files
How to delete search history on CH Play, hide searched content
How to turn off search personalization on Google
Instructions for creating ChatGPT Search shortcuts on iPhone
How to use Vlookup function in Excel to search and reference
Search Race: Is ChatGPT Threatening Google's Throne?