✍️ 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

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.

πŸ’‘ Useful resources

Here are some ideas for you

Optional resources that may help if you are learning formulas, building reports, or working in spreadsheets often.

  • πŸ“˜
    Excel formula books

    Practice formulas with structured examples you can keep beside your desk.

    See ideas
  • ⌨️
    Excel shortcut guides

    Build speed with keyboard shortcuts for selection, formatting and navigation.

    See ideas
  • πŸ”’
    Numeric keypads

    Helpful if you enter many numbers on a laptop or compact keyboard.

    See ideas
  • πŸ–₯️
    External monitors

    Useful for viewing large worksheets, formulas and reference tables side by side.

    See ideas
  • πŸ“’
    Desk notebooks

    Sketch formula logic, report ideas and table structures before building.

    See ideas
  • πŸ’»
    Laptop stands

    Make long spreadsheet sessions more comfortable and ergonomic.

    See ideas

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