Excel SUBSTITUTE function

Replaces text with other text inside a cell, every time it appears. In Spanish Excel it is called SUSTITUIR.

Syntax

English Excel

=SUBSTITUTE(text, old_text, new_text, [instance_num])

Spanish Excel (Mexico)

=SUSTITUIR(texto, texto_original, texto_nuevo, [núm_de_instancia])

Spanish Excel (Spain, Latin America)

=SUSTITUIR(texto; texto_original; texto_nuevo; [núm_de_instancia])

ArgumentWhat it is
textThe text or cell.
old_textWhat to replace.
new_textWhat goes in its place; "" to delete.
instance_numoptionalOnly the n-th occurrence.

Example

SUBSTITUTE(text, old_text, new_text) replaces some text with other text inside a cell. With "" as the new text, it deletes it.

=SUBSTITUTE(A2,"-","")

Common mistake

It is case-sensitive: SUBSTITUTE("Hello","h","j") changes nothing.

About Ads

This site uses Google AdSense to display ads. These ads help us keep WebHerramientas completely free. Ads are managed by Google and meet strict security and privacy standards.

Advertising
Loading ad...

Ads help us keep WebHerramientas free for everyone

Practice SUBSTITUTE

Type the formula in the sheet and check it instantly. Spanish or English function names both work. See all lessons

SUBSTITUTE

SUBSTITUTE(text, old_text, new_text) replaces some text with other text inside a cell. With "" as the new text, it deletes it.

Example=SUBSTITUTE(A2,"-","")SUSTITUIR = SUBSTITUTE

In B2, remove the hyphens from the phone number.

B2
ABC
1PhoneDigits only
255-1234-5678
333-9876-5432
481-5555-0101
5998-123-4567
6222-765-4321
7

Tip: while typing, click a cell or drag across several to insert their reference.

Frequently asked questions

What is SUBSTITUTE called in Spanish?
In Spanish Excel it is SUSTITUIR. The formula =SUBSTITUTE(A2,"-","") is written =SUSTITUIR(A2;"-";"") (or with commas in Mexico).
Why does SUBSTITUTE use semicolons in some Excel versions?
It depends on regional settings. Where the comma is the decimal mark (Spain, much of South America), Excel separates arguments with semicolons. English Excel and Mexican Spanish Excel use commas.
What is the most common SUBSTITUTE mistake?
It is case-sensitive: SUBSTITUTE("Hello","h","j") changes nothing.