Free AI Excel Formula Generator

Convert your text instructions into Excel formulas, or get explanations for existing formulas.

REPLACE Function Tutorial

The REPLACE function in Excel is used to replace a part of a text string with a different text string. The syntax is:

REPLACE(old_text, start_num, num_chars, new_text)
  • old_text: The original text string where the replacement will occur.
  • start_num: The position in the text string where the replacement will begin (starting from 1).
  • num_chars: The number of characters in the text string to replace.
  • new_text: The new text string that will replace the specified characters.

Example:
If you have the text “Hello World” in cell A1 and you want to replace “World” with “Excel”, you can use the formula:

=REPLACE(A1, 7, 5, "Excel")

This will return “Hello Excel”.

Notes:

  1. The REPLACE function is case-sensitive.
  2. If the start_num is greater than the length of the text, the new_text will be appended to the end.
  3. If num_chars is 0, the new_text will be inserted without replacing any characters.