FxFormula Drills

Premium exercise · Excel text and date functions

SUBSTITUTE practice: strip dashes

Practice Excel SUBSTITUTE by removing dashes from phone numbers so only the digits remain.

Column A has phone numbers with dashes. A downstream system wants digits only.

In column B, use SUBSTITUTE to replace every dash with nothing.

Dataset

Starter sheet. Cells marked formula are where the formula goes.

Starter sheet for this exercise
RowAB
1PhoneDigits
2555-010-1234Formula goes in B2. formula
3555-019-9876Formula goes in B3. formula

Hint

SUBSTITUTE takes the text, the characters to find, and the characters to use instead.

Explanation

This exercise practices SUBSTITUTE in Excel. The formula goes in B2, B3.

SUBSTITUTE swaps each dash for an empty string. 555-010-1234 becomes 5550101234, and 555-019-9876 becomes 5550199876. The digits stay in their original order.

The interactive sheet and a worked solution are part of Formula Drills Premium. The instructions and starter data on this page are the full problem.

Solve this exercise

Practice this formula

Loading the practice grid…