EDUCBA Logo

EDUCBA

MENUMENU
  • Explore
    • EDUCBA Pro
    • PRO Bundles
    • All Courses
    • All Specializations
  • Blog
  • Enterprise
  • Free Courses
  • All Courses
  • All Specializations
  • Log in
  • Sign Up
Home Excel Excel Resources Lookup & Reference Functions in Excel REPLACE Function in Excel
 

REPLACE Function in Excel

Pradeep S
Article byPradeep S
Madhuri Thakur
Reviewed byMadhuri Thakur

Updated May 5, 2023

REPLACE in Excel

 

 

REPLACE in Excel

Replace function in Excel by which we can replace any portion of a cell content by selecting the start and last word till we want to replace it with the word in the same syntax. This is as easy as using Find and Replace operational function.

Watch our Demo Courses and Videos

Valuation, Hadoop, Excel, Mobile Apps, Web Development & many more.

REPLACE Formula in Excel

Below is the REPLACE Formula in Excel:

REPLACE Formula in Excel

The REPLACE function in Excel has the following arguments:

  • Old_text (Compulsory or required parameter): The cell reference contains the text you want to replace. (It may contain text or numeric data)
  • Start_Num (Compulsory or required parameter): It is the starting position from where the search should begin, i.e., From the left side of the character in the old_text argument
  • Num_chars (Compulsory or required parameter): The number of characters you want to replace.
  • new_text (Compulsory or required parameter): It is the new text that you’d like to replace the old_text
Note: the new_text argument does not need to be similar or the same length as num_chars.

How to use REPLACE Function in Excel?

REPLACE Function is very simple to use. Let us now see how to use REPLACE function in Excel with the help of some examples.

You can download this REPLACE Function Excel Template here – REPLACE Function Excel Template

Example #1 – REPLACE Function for Name Change

The below-mentioned example, Cell “B8”, contains the name “Andrew Edward”. Here I need to REPLACE that name with the correct name, i.e., John Edward, with the help of REPLACE function.

Example 1

Let’s apply to REPLACE function in cell “C8”. Select the cell “C8” where REPLACE function needs to be applied.

REPLACE Function Example 1-2

Click the insert function button (fx) under the formula toolbar, and a dialog box will appear, type the keyword “REPLACE” in the search for a function box, REPLACE function will appear in the select a function box. Double click on REPLACE function.

REPLACE Function Example 1-3

A dialog box appears where arguments for REPLACE function need to be filled or entered i.e.

REPLACE Function Example 1-4

=REPLACE(old_text, start_num, num_chars, new_text)

  • Old_text: is the cell reference containing the text you want to replace. i.e., “B8” or “Andrew Edward.”
  • Start_Num: It is the starting position from where the search should begin, i.e., From the left side of the character in the old_text argument, i.e., 1
  • Num_chars or Number_of_chars: It is the number of characters you want to replace. i.e., The word ANDREW contains 6 letters which I need to replace; therefore, it is 6
  • new_text: The new text you’d like to replace the old_text, here “John” is a new string & “Andrew” is the old string. i.e., Here, we have to enter a new string, i.e., “John.”

Click ok after entering all the replace function arguments.

REPLACE Function Example 1-5

=REPLACE(B8,1,6,”John”)

 It replaces text in a specified position of a given or supplied string, i.e., John Edward in cell C8.

Result of Example 1

Example #2 – Addition Of Missing Word In A Text

In the below-mentioned example, In cell “B12” contains the word “News”. Here I need to add the missing word, i.e., “Paper,” with the help of REPLACE function.

Example 2

Let’s apply to REPLACE function in cell “C12”. Select the cell “C12” where REPLACE function needs to be applied,

REPLACE Function Example 2-2

Click the insert function button (fx) under the formula toolbar, and a dialog box will appear, type the keyword “REPLACE” in the search for a function box, REPLACE function will appear in the select a function box. Double click on REPLACE function.

REPLACE Function Example 2-3

A dialog box appears where arguments for REPLACE function need to be filled or entered i.e.

REPLACE Function Example 2-4

=REPLACE(old_text, start_num, num_chars, new_text)

  • Old_text: is the cell reference containing the text you want to replace. i.e., “B12” or “News.”
  • Start_Num: From the left side of the character in old_text argument (News), i.e. 5, from 5th position, add a New_text
  • Num_chars or Number_of_chars: Here, it is left blank. i.e., We are not replacing anything here, as we are adding a missing word to old_­text.
  • New_text: We are not replacing anything here; “Paper” is a new string. Therefore, we have to enter a new string to be added to that old text. i.e., “Paper”
Note: We had to add one space before the word “paper.”

Click ok after entering all the replace function arguments.

REPLACE Function Example 2-5

=REPLACE(B12,5,,” Paper”)

It adds the new text in a specified position, i.e., “News Paper” in cell C12.

Result of Example 2

Example #3 – Addition Of Hyphen In Phone Number

In the below-mentioned example, Cell “G8” contains a contact number with state code “0224038991”. Here I need to add a hyphen after the state code with the help of replace function. i.e., “022-4038991.”

Example 3

Let’s apply to REPLACE function in cell “H8”. Select the cell “H8” where REPLACE function needs to be applied.

REPLACE Function Example 3-2

Click the insert function button (fx) under the formula toolbar, and a dialog box will appear, type the keyword “REPLACE” in the search for a function box, REPLACE function will appear in the select a function box. Double click on REPLACE function.

REPLACE Function Example 3-3

A dialog box appears where arguments for REPLACE function need to be filled or entered i.e.

REPLACE Function Example 3-4

=REPLACE(old_text, start_num, num_chars, new_text)

  • Old_text: is the cell reference containing the text you want to replace. i.e., “G8” or “0224038991.”
  • Start_Num: From the character’s left side in the old_text argument, i.e., 4. At the 4th position, add the hyphen “-“
  • Num_chars or Number_of_chars: Here, it is left blank. i.e., We are not replacing anything here, as we are adding Hyphen in between the contact number
  • New_text: We are not replacing anything here, “-” i.e., Hyphen is a special character or new string Which has to be added in between an old string
Note: We had to add one space before & after the hyphen “-” to get the desired result

Click ok, after entering all the arguments in replace function.

REPLACE Function Example 3-5

=REPLACE(“0224038991″,4,,” – “)

It replaces the hyphen “-” in a specified position, i.e., “022-4038991” in cell C12.

Result of Example 3

Things to Remember

#VALUE error occurs if the start_num or num_chars argument is a non-numeric or negative value.

REPLACE Example 1-1

It will throw a Value Error.

Value Error

#NAME error Occurs if the Old_text argument is not enclosed in double quotation marks

REPLACE Example 1-3

It will throw a Name Error.

Name Error

Recommended Articles

This has been a guide to REPLACE in Excel. Here we discuss the REPLACE Formula and how to use REPLACE function in Excel, along with practical examples and a downloadable Excel template. You can also go through our other suggested articles –

  1. Excel DAY Function
  2. YEAR Function in Excel
  3. Find and Replace in Excel
  4. REPLACE Formula in Excel
Primary Sidebar
Footer
Follow us!
  • EDUCBA FacebookEDUCBA TwitterEDUCBA LinkedINEDUCBA Instagram
  • EDUCBA YoutubeEDUCBA CourseraEDUCBA Udemy
APPS
EDUCBA Android AppEDUCBA iOS App
Blog
  • Blog
  • Free Tutorials
  • About us
  • Contact us
  • Log in
Courses
  • Enterprise Solutions
  • Free Courses
  • Explore Programs
  • All Courses
  • All in One Bundles
  • Sign up
Email
  • [email protected]

ISO 10004:2018 & ISO 9001:2015 Certified

© 2025 - EDUCBA. ALL RIGHTS RESERVED. THE CERTIFICATION NAMES ARE THE TRADEMARKS OF THEIR RESPECTIVE OWNERS.

EDUCBA

*Please provide your correct email id. Login details for this Free course will be emailed to you
EDUCBA

*Please provide your correct email id. Login details for this Free course will be emailed to you
EDUCBA

*Please provide your correct email id. Login details for this Free course will be emailed to you

Loading . . .
Quiz
Question:

Answer:

Quiz Result
Total QuestionsCorrect AnswersWrong AnswersPercentage

Explore 1000+ varieties of Mock tests View more

EDUCBA
Free Excel Course

Excel functions, formula, charts, formatting creating excel dashboard & others

By continuing above step, you agree to our Terms of Use and Privacy Policy.
*Please provide your correct email id. Login details for this Free course will be emailed to you
EDUCBA

Download REPLACE Function Excel Template

EDUCBA Login

Forgot Password?

EDUCBA

Download REPLACE Function Excel Template

EDUCBA

डाउनलोड REPLACE Function Excel Template

🚀 Limited Time Offer! - 🎁 ENROLL NOW