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])
| Argument | What it is |
|---|---|
| text | The text or cell. |
| old_text | What to replace. |
| new_text | What goes in its place; "" to delete. |
| instance_numoptional | Only 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.
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.
In B2, remove the hyphens from the phone number.
| A | B | C | |
|---|---|---|---|
| 1 | Phone | Digits only | |
| 2 | 55-1234-5678 | ||
| 3 | 33-9876-5432 | ||
| 4 | 81-5555-0101 | ||
| 5 | 998-123-4567 | ||
| 6 | 222-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.