SEARCH/SEARCHB Function

The SEARCH/SEARCHB function is one of the text and data functions. Is used to return the location of the specified substring in a string. The SEARCH function is intended for languages that use the single-byte character set (SBCS), while SEARCHB - for languages that use the double-byte character set (DBCS) like Japanese, Chinese, Korean etc.

The SEARCH/SEARCHB function syntax is:

SEARCH(string-1, string-2 [,start-pos])

SEARCHB(string-1, string-2 [,start-pos])

where

string-1 is the substring to find.

string-2 is the string to search within.

start-pos is the position to start searching from. It is an optional argument. If it is omitted, the function will perform the search from the beginning of string-2.

The data can be entered manually or included into the cells you make reference to.

Note: if the function does not find the matches, it will return a #VALUE! error.

To apply the SEARCH/SEARCHB function,

  1. select the cell where you wish to display the result,
  2. click the Insert function
    icon situated at the top toolbar,
    or right-click within a selected cell and select the Insert Function option from the menu,
    or click the
    icon situated at the formula bar,
  3. select the Text and data function group from the list,
  4. click the SEARCH/SEARCHB function,
  5. enter the required arguments separating them by comma,

    Note: the SEARCH/SEARCHB function is NOT case-sensitive.

  6. press the Enter button.

The result will be displayed in the selected cell.

SEARCH Function