Help Centre › Functions & Formulas
For a full list of available calculation functions, please read What calculation functions are supported.
This article describes the formula syntax and usage of the REPLACE function.
Description
REPLACE replaces part of a text string, based on the number of characters you specify, with a different text string.
Syntax
REPLACE(old_text, start_num, num_chars, new_text)
The REPLACE function syntax has the following arguments:
Example
| Formula | Description | Result |
| =REPLACE(A2, 6, 5, "*") | Replaces five characters in abcdefghijk with a single * character, starting with the sixth character (f). | abcde*k |
| =REPLACE(A3, 3, 2, "10") | Replaces the last two digits (09) of 2009 with 10. | 2010 |
| =REPLACE(A4, 1, 3, "@") | Replaces the first three characters of 123456 with a single @ character. | @456 |
Errors
For a full list of formula errors, please read Formula errors.