Exceljet

Quick, clean, and to the point

Excel REPLACE Function

Excel REPLACE function
Summary 

The Excel REPLACE function replaces characters specified by location in a given text string with another text string. For example =REPLACE("XYZ123",4,3,"456") returns "XYZ456".

Purpose 
Replace text based on location
Return value 
The altered text.
Syntax 
=REPLACE (old_text, start_num, num_chars, new_text)
Arguments 
  • old_text - The text to replace.
  • start_num - The starting location in the text to search.
  • num_chars - The number of characters to replace.
  • new_text - The text to replace old_text with.
Usage notes 
  • Use the REPLACE function when you want to replace text based on its location in a string.
  • Use FIND or SEARCH to find the location of text to replace it it's not known in advance.
  • Use SUBSTITUTE to replace text based on content.

Excel Formula Training

Formulas are the key to getting things done in Excel. In this accelerated training, you'll learn how to use formulas to manipulate text, work with dates and times, lookup values with VLOOKUP and INDEX & MATCH, count and sum with criteria, dynamically rank values, and create dynamic ranges. You'll also learn how to troubleshoot, trace errors, and fix problems. Instant access. See details here.