How to Use the REPLACE Function in Excel

Writer
Updated on: March 26, 2023

Microsoft Office can offer you so many tools along with its programs. However, the devices will change depending on which program you are in the current memento.

That’s why you can find some Microsoft tools in Excel as functions. That is the case with the REPLACE operation. So are you ready to learn how to use the REPLACE function in Excel? Let’s do it!

Description:

The REPLACE function in Excel is useful for editing or replacing specific characters in a cell or range of cells. In addition, of course, you can use it to supersede one or more letters or numbers with new ones or to remove characters altogether. 

Note: Usually, people can alter this tool with the SUBSTITUTE operation as well.

Insert & Syntax:

To start, you need to select the blank cell where you want to see the result of this operation. Once you have it, type the following syntax:

=REPLACE(old_text, start_num, num_chars, new_text)

Where:

  • old_text: is the text or cell reference containing the original text you want to replace.
  • start_num: the position in the original text where you want to replace characters. This is a numeric value.
  • num_chars: the number of characters you want to replace. This is also a numeric value.
  • new_text: the text or cell reference containing the new text you want to insert.

Note: If start_num is greater than the length of old_text, then the function will return #VALUE!

Usages:

You can use the REPLACE function in many scenarios. However, here you have some everyday use cases:

  1. Replacing a specific character in a cell:

To clarify, let's make an example: So, if you have a cell containing the text "apple," and you want to replace the letter "a" with the letter "o" you can use the following formula:

=REPLACE(A1;1;1; “o”)

This will replace the first character in the cell with "o," resulting in the text "opple."

Note: Excel will replace the character you need with the exact one you put in the formula, so if you need a capital letter, you must write it into the syntaxis.

  1. Replacing multiple characters in a cell:

On the other hand, you can use the REPLACE function multiple times when you want to replace multiple characters in a cell. Similarly to the first example, let's say you have a cell containing the text "watermelon". If you want to replace the letters "me" with the letters "ba", you can use the following formula:

=REPLACE(REPLACE(A1;FIND(“me”;A1);2;“ba”);FIND(“me”;A1);2;“ba”)

This will find the first occurrence of "me" in the text and replace it with "ba", resulting in the text "waterbalon".

M1J7HNLc4zNpc6w msrPEm68WNVA0PtOqcjnM XK8VCzCI2qT3l3NiY94q06dZLgUgOvfPBwgQ

Conclusion:

In the end, the REPLACE function in Excel is a powerful tool that can help you quickly edit or replace specific characters in a cell or range of cells. So once you understand its syntax and know which value you want to change, you can use the function to accomplish a wide range of tasks, from simple text replacements to more complex edits.

Do you want to know more?

You can use the replace function as many times as you require! But you can also combine this great function with the Right, MID, LEN & LEFT functions, or the AND, OR, & NOT logic to make complex formulas and achieve your goals!

Finally, if you want to improve your Excel and productivity skills, you must check out our Excel course here at Skillademia!

Lorena M. Rodas leverages her experience across film, writing, and production to make complex tech concepts accessible through storytelling. With a background spanning sci-fi, AI, and emerging tech, Lorena translates her depth of knowledge into engaging, educational content. She is an expert at decoding high-level topics to reach broad audiences.
Access 4,242+ video lessons. Instantly.
Start Learning Now →
crossmenu