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
- 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
May be interested
- Date time functions in Excelexcel supports you to process and calculate quickly with the functions that excel provides such as calculation functions, date functions ... one of them is the function of time to help you handle the prices. time value: hour, minute, second conveniently
- Syntax and description of search and reference functions in Excelthe following article summarizes the syntax and description of the search and reference functions in excel.
- 10 EXCEL functions that ACCOUNTERS often usein excel, there are many functions that can help accounting in daily data entry, but here are some common functions used by accounting.
- Instructions for using the Find and Replace functions in Excelwith excel spreadsheets with large amounts of data, it is very time consuming to search and replace data cells manually. the following article details how to use the find and replace function in excel.
- The 10 most useful but often forgotten functions in excelmicrosoft excel is an extremely effective and effective calculation tool not only for accounting and office but also for many other industries.
- Logical functions (logical) in Excellogical functions are used a lot during data processing in excel. the article summarizes the syntax and functions of functions in logical function groups in excel.
- How to use Excel's VALUE functionexcel's value function will convert a string to a digital form, which can be combined with other functions such as left function, right function, mid function.
- Instructions for using Index function in Excelindex is a function that returns an array in excel. when using the index function, you get the values in a cell between the column and the row.
- Tips for working with functions in Excelfunctions that work with excel functions functions are predefined formulas for performing specific calculations, or for manipulating spreadsheets.
- How to add computers to Excelto perform complex calculations on excel or even change units, we can install computers on excel.