REPLACE function

Excel REPLACE Function allows you to replace a specified number of characters within a text string with new text. It’s a useful tool for making changes to your data quickly and efficiently.

Syntax

REPLACE(old_text, start_num, num_chars, new_text)

Arguments

old_textThe original text in which you want to make replacements.
start_numThe position in the old_text where the replacement should begin.
num_charsThe number of characters to replace in old_text.
new_textThe text that you want to replace the old_text with.

How to use

Let’s dive into using the REPLACE function with some examples:

This formula replaces “World” in the text with “Universe,” starting from the 7th character, resulting in “Hello, Universe.”

In this example, we start at the 8th character and replace the following 2 characters with an empty string, effectively removing them: “OpenAI amazing!”

This formula replaces the first vowel in the text with “X,” making it “Rexplace every vowel with ‘X’.”

Excel’s REPLACE function is a handy tool for manipulating text within your spreadsheets. It’s easy to use and can save you a lot of time when you need to make specific changes to your data.

Tomasz Decker is an Excel specialist, skilled in data analysis and financial modeling.