Excel + Google Sheets · SUBSTITUTE
Replace any character everywhere
Replaces a piece of text with another, in every cell.
The formula
=SUBSTITUTE(A2, "-", "")What each part means
A2The text"-"What to remove""What to put instead (nothing)
Example
| A | B | |
|---|---|---|
| 1 | Phone | Clean |
| 2 | 555-123-4567 | |
| 3 | 555-987-6543 | |
| 4 | 555-246-8100 |
| A | B | |
|---|---|---|
| 1 | Phone | Clean |
| 2 | 555-123-4567 | 5551234567 |
| 3 | 555-987-6543 | 5559876543 |
| 4 | 555-246-8100 | 5552468100 |
Step by step
- Click cell B2.
- Type the formula:
=SUBSTITUTE(A2, "-", "") - Press Enter.
- Drag the small square in the bottom-right corner of the cell down to copy it to the other rows.
Where it works
- Every version of Excel
- Google Sheets
- Excel for the web (free)
The same formula in other languages
- English SUBSTITUTE
- Español SUSTITUIR
- Português SUBSTITUIR