REPLACE Function

About

REPLACE function replaces a given number of characters at a given position of a text string with a given text string. For example the formula =REPLACE(“144-978-6872″,1,3,”XYZ”) will return XYZ-978-6872.

Function Type

Text

Purpose

Replace a character or characters based on position.

Return value

Modified text.

Syntax

=REPLACE(old_text,start_num,num_chars,new_text)

Arguments

old_text – Character or characters to replace

start_num – The position of the character in old_text that you want to replace with new_text.

num_chars – Number of characters to replace

new_text – The text that will replace characters in old_text.


Example 1


Notes

REPLACE function replaces text based on position. To replace text based on content, use SUBSTITUTE function.


Read about Excel Functions

Excel Functions in Alphabetical Order (Complete list)

Complete List of Excel Functions (Category wise)


New Dynamic Array Functions in Excel

LET Function in Excel

STOCKHISTORY Function in Excel