# REPLACE/REPLACEB Function

The REPLACE/REPLACEB function is one of the text and data functions. Is used to replace a set of characters, based on the number of characters and the start position you specify, with a new set of characters. The REPLACE function is intended for languages that use the single-byte character set (SBCS), while REPLACEB - for languages that use the double-byte character set (DBCS) like Japanese, Chinese, Korean etc.

The REPLACE/REPLACEB function syntax is:

REPLACE(string-1, start-pos, number-chars, string-2)

REPLACEB(string-1, start-pos, number-chars, string-2)

where

string-1 is the original text to be replaced.

start-pos is the beginning of the set to be replaced.

number-chars is the number of characters to be replaced.

string-2 is the new text.

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

To apply the REPLACE/REPLACEB 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 REPLACE/REPLACEB function,
5. enter the required arguments separating them by comma,

   Note: the REPLACE function is case-sensitive.

6. press the Enter button.

The result will be displayed in the selected cell.