Categories: Excel Functions

Excel REPLACE Function

What is the Excel REPLACE Function?

The excel REPLACE function replaces the text based on a predetermined position.

Excel has another function to change a text, namely the excel SUBSTITUTE function. What’s the difference between the REPLACE function and the SUBSTITUTE function? Please read the following article:

REPLACE Syntax

REPLACE(old_text, start_num, num_chars, new_text)

old_text, required, the text in which you want to replace.

start_num, required, the starting position of the character to replace with the new_text.

num_chars, required, the number of characters to replace with the new_text.

Usage notes:

How to Use REPLACE Function in Excel

The following is an example of the REPLACE function usage and the results.

REPLACE Function #1

=REPLACE(A2,B2,C2,D2)

The REPLACE function replaces 2 characters in position 1 with characters “19”. The result is 19-0001

REPLACE Function #2 – REPLACE Function #4

=REPLACE(A3,B3,C3,D3)

=REPLACE(A4,B4,C4,D4)

=REPLACE(A5,B5,C5,D5)

All functions return a #VALUE error. You can’t use negative numbers for the start_num and num_chars arguments. In addition to negative numbers, you can’t use zero number in the start_num argument.

REPLACE Function #5

=REPLACE(A6,B6,C6,D6)

If you use zero number for the num_chars argument the result is like adding new_text to old_text; no characters changed, where the new_text will be added depending on the value of the start_num argument.

REPLACE Function #6

=REPLACE(A7,B7,C7,D7)

If the start_num argument is greater than the text length, new_text will be added to the end of old_text. Regardless of the numbers entered in the num_chars argument, it does not affect the results.

REPLACE Example

Another article using or explain about REPLACE Function

Another Text Function

Usefull links
  • Microsoft REPLACE and REPLACEB function documentation
Share
Tags: Excel Find Replace FormulaExcel Formula Replace TextExcel ReplaceExcel Replace CharacterExcel Replace Formula with ValueExcel Replace SpaceExcel Replace StringExcel Replace TextFind and Replace Function in ExcelHow to Replace Values in ExcelHow to Use Replace Function in ExcelReplace Formula in ExcelReplace Function in ExcelText Functions

Recent Posts

  • Excel Formula

Calculate Number of Days, Weeks, Months and Years Between Two Dates in Excel

Calculate Number of Days Between Two Dates Excel has a function that calculates the number of days between two dates,…

1 week ago
  • Excel 101

Flash Fill Excel

What is Flash Fill Excel Flash Fill automatically fills your data when Excel detects a pattern in your initial data…

3 weeks ago
  • Excel 101

Paste Special Excel

What is Paste Special Paste special is a paste but you can choose the result type. As we all know,…

1 month ago
  • Excel Functions

Excel TEXTJOIN Function

What is the Excel TEXTJOIN Function? The excel TEXTJOIN function is the best function to concatenate strings in Excel, has…

1 month ago
  • Excel Functions

Excel CONCAT Function

What is the Excel CONCAT Function? The excel CONCAT function combines all data; it could be a text, a number…

2 months ago
  • Excel Functions

Excel CONCATENATE Function

What is the Excel CONCATENATE Function? The excel CONCATENATE function combines text or numbers into a text. CONCATENATE Syntax CONCATENATE(text1,…

2 months ago