Leah Books / How-to guides

Spreadsheet tip

Clean up phone numbers with one formula

Phone numbers typed different ways are hard to sort and match. This formula strips everything that isn't a digit and lays the 10 digits out the same way.

Video coming soonClean up phone numbers in Excel or SheetsWatch our other how-to videos on YouTube

Filmed in the Leah Books sample books, with a made-up company.

Steps

  1. Put the numbers in a column

    For example, phone numbers in column A, starting in A2.

  2. Add the formula

    In B2, paste the formula below and fill it down. REGEXREPLACE keeps only the digits, VALUE makes them a number, and TEXT lays them out as (000) 000-0000.

  3. Numbers that start with 1

    For numbers like 1-312-555-0147, use the second formula: RIGHT keeps the last 10 digits.

  4. Find it in Leah Books

    Open Spreadsheet Help and search phone. Copy it for Excel or Google Sheets, or try it with your own number right there.

The formula (data in A2):

=TEXT(VALUE(REGEXREPLACE(A2&"","[^0-9]","")),"(000) 000-0000")

For numbers that start with 1:

=TEXT(VALUE(RIGHT(REGEXREPLACE(A2&"","[^0-9]",""),10)),"(000) 000-0000")

Related guides