Clear, practical technology insights BSOD Code Lookup · Windows Error Code Lookup · Wi-Fi Troubleshooting · PC Troubleshooting Checklist

SEARCH () and SEARCHB () Functions in Excel

Explore SEARCH () and SEARCHB () Functions in Excel with a clear summary of the key facts, context, and practical details readers should know.

Table of Contents

This article provides a clear overview of SEARCH () and SEARCHB () Functions in Excel, with the main facts, useful context, and practical details organized for easy reading.

SEARCH () and SEARCHB () Functions in Excel example screenshot 1

this guide 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]))

Arguments

- 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.

SEARCH () and SEARCHB () Functions in Excel — For Example screenshot 2

- Find the Word "mem" in the string within_text.

SEARCH () and SEARCHB () Functions in Excel — For Example screenshot 3

In addition, you can combine with other functions if you may need 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.

Example

For example: Replace "mem" in string within_text with "arc".

Apply the formula: = REPLACE (C6, SEARCH (B7, C6), 3, "arc") .

SEARCH () and SEARCHB () Functions in Excel — Example screenshot 4

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!

FAQ

What is the main focus of SEARCH () and SEARCHB () Functions in Excel?

The article explains the most important facts, context, and practical details related to SEARCH () and SEARCHB () Functions in Excel.

Who may find this information useful?

It is useful for readers who want a clear overview, practical context, and a better understanding of the subject.

What should readers verify before taking action?

Check current product versions, official requirements, regional availability, and any details that may have changed since the original publication.

Discussion

Reader Comments 0

Sign in with email or Google to join the discussion.