โœ๏ธ Excel text examples

SUBSTITUTE Examples in Excel

Learn practical substitute examples in excel for cleaning text, extracting values and building spreadsheet labels.

Updated 2026-06-125 practical examplesCopy-ready

๐Ÿ’ก Ideas for You

Learning resources for Excel formulas, spreadsheets and reporting.

4 useful links

Some links in this section may be affiliate links. Choose only what is useful for your own work.

What it does

SUBSTITUTE replaces specific text inside a cell.

Syntax or pattern

=SUBSTITUTE(text, old_text, new_text, [instance_num])
โœ…

5 practical examples

1

Remove dashes from codes

Turn product codes into plain text.

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

Useful before matching IDs.

2

Replace old labels

Change โ€œPendingโ€ to โ€œOpenโ€.

=SUBSTITUTE(A2,"Pending","Open")

Works on exact text fragments.

3

Remove spaces

Delete all spaces from a code.

=SUBSTITUTE(A2," ","")

Different from TRIM, which keeps single spaces.

4

Replace only first instance

Replace the first slash only.

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

The final argument controls which instance is replaced.

5

Normalize phone numbers

Remove common punctuation.

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

Nested SUBSTITUTE can clean simple patterns.

Common mistakes to avoid

  • Not handling missing delimiters.
  • Forgetting that some text functions return text, not numbers.
  • Using fixed positions when the text layout is not consistent.

Related Excel examples

FAQ

Can text formulas work with Excel Tables?

Yes. Table references can make text-cleaning formulas easier to understand.