Skip to main content
← Back to blog
Phone Number Management5 min read

How to Extract Phone Numbers from Excel and Google Sheets

You have a spreadsheet with phone numbers scattered across columns — mixed in with names, addresses, notes, and formatting that makes them impossible to use directly. Maybe they're inconsistent: some have country codes, some don't, some use dashes, others use spaces or parentheses.

You need clean, usable phone numbers. Here's how to get them out.

The Problem with Phone Numbers in Spreadsheets

Spreadsheets are where phone numbers go to get messy. Common issues:

  • Mixed formatting — One cell has +1 (555) 123-4567, the next has 5551234567, the next has 555.123.4567
  • Numbers stored as text — Excel silently strips leading zeros from numbers, turning 07911 123456 into 7911123456
  • Extra data in cells — Phone numbers crammed into the same cell as names or addresses
  • Duplicate entries — The same number appears five times with different formatting
  • Country code inconsistencies — Some entries include +44, others assume you'll figure it out

Manually cleaning this up cell by cell takes forever. There are faster approaches.

Method 1: Copy-Paste into NumSwift (Fastest)

This works for any spreadsheet — Excel, Google Sheets, CSV, Numbers:

  1. Select the column or range containing phone numbers
  2. Copy (Ctrl/Cmd+C)
  3. Paste into NumSwift's phone number extractor
  4. Every valid phone number is extracted, deduplicated, and formatted

NumSwift ignores names, addresses, and other text in the pasted data. It finds only the phone numbers, validates them, and gives you instant actions — WhatsApp, SMS, call, or copy.

This is the same approach that works for extracting numbers from emails and documents, just with spreadsheet data as the source.

Method 2: Excel Formulas

If you want to stay inside Excel, you can use formulas to clean phone numbers. But it's limited.

Strip Non-Numeric Characters

To reduce a phone number to digits only:

=TEXTJOIN("", TRUE, IF(ISNUMBER(--MID(A1, ROW(INDIRECT("1:"&LEN(A1))), 1)), MID(A1, ROW(INDIRECT("1:"&LEN(A1))), 1), ""))

This array formula (enter with Ctrl+Shift+Enter in older Excel) removes everything except digits.

Limitations:

  • Strips the + from country codes
  • Can't tell if the result is actually a valid phone number
  • Doesn't handle the case where a cell contains a phone number mixed with other text

Extract Numbers with SUBSTITUTE Chains

A simpler (but uglier) approach for removing common separators:

=SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(A1," ",""),"-",""),"(",""),")",""),".","")

Limitations: Only works when the cell contains just a phone number, not mixed data.

Method 3: Google Sheets REGEXEXTRACT

Google Sheets has built-in regex support:

=REGEXEXTRACT(A1, "[\+]?[\d\s\-\(\)\.]{7,15}")

This pulls the first phone-number-like pattern from a cell.

Limitations:

  • Only extracts the first match per cell
  • No validation — matches anything that looks vaguely like a number
  • False positives on ZIP codes, order numbers, and other digit sequences
  • Breaks if the cell doesn't contain a match (returns an error)

For a more reliable approach to identifying real phone numbers versus lookalikes, see our phone number validator guide.

Method 4: Python Script for Large Datasets

For spreadsheets with thousands of rows:

import openpyxl
import phonenumbers

wb = openpyxl.load_workbook('contacts.xlsx')
ws = wb.active

numbers = set()
for row in ws.iter_rows(values_only=True):
    for cell in row:
        if cell is None:
            continue
        text = str(cell)
        for match in phonenumbers.PhoneNumberMatcher(text, 'US'):
            formatted = phonenumbers.format_number(
                match.number,
                phonenumbers.PhoneNumberFormat.E164
            )
            numbers.add(formatted)

for number in sorted(numbers):
    print(number)

This uses Google's libphonenumber (the same library behind NumSwift) to properly validate and format every number. It handles mixed-data cells, deduplicates results, and outputs clean E.164 format.

Google Sheets Specifics

Google Sheets adds its own quirks:

Auto-formatting — Google Sheets may convert phone numbers to dates or scientific notation. A cell containing 1-234-567-8901 might display as a date. To prevent this, format the column as Plain Text before pasting numbers.

Leading zeros — Numbers starting with 0 lose the zero when stored as a number type. Format as Plain Text or prefix with an apostrophe ('07911123456).

Export to CSV — When you download a Google Sheet as CSV, formatting is stripped. Numbers stored as "Number" type may lose leading zeros permanently. Always format phone number columns as Plain Text before exporting.

CSV Files

CSV files have no formatting — just raw values separated by commas. Phone numbers in CSVs often arrive broken:

Name,Phone,Email
"John Smith","555-123-4567",john@example.com
"Jane Doe","(555) 987-6543",jane@example.com

Opening a CSV in Excel can corrupt phone numbers (stripping zeros, converting to scientific notation). To avoid this:

  1. In Excel: Use File → Import (not Open), choose "Text" as the column type for phone number columns
  2. In Google Sheets: Import, then immediately format the phone column as Plain Text
  3. Fastest option: Open the CSV in a text editor, select all, paste into NumSwift

When You Have Hundreds of Numbers

For large spreadsheets with hundreds or thousands of phone numbers, the copy-paste approach still works. Select the entire column, copy, paste into NumSwift's bulk phone number extractor. It processes large volumes without slowing down and deduplicates automatically.

For sales teams dealing with lead lists, CRM exports, and prospect spreadsheets, see how phone number extraction fits into sales workflows.

Tips for Cleaner Spreadsheet Data

  1. Format phone columns as Text from the start. This prevents Excel and Google Sheets from mangling numbers. Do this before entering or importing data.

  2. Include country codes. A number like 7911123456 is ambiguous without a country code. Store numbers in international format (+447911123456) whenever possible. Our international phone number format guide covers the conventions for major countries.

  3. One number per cell. Avoid cramming multiple phone numbers into a single cell. If you must, separate them with a clear delimiter like a semicolon.

  4. Paste more, not less. When copying into NumSwift, select the entire range rather than trying to pick out just the phone number column. NumSwift ignores non-phone-number data automatically.

Related Guides

Bottom Line

Spreadsheet phone numbers are almost always messy. Excel formulas and Google Sheets regex can clean simple cases, but they break on mixed data, can't validate numbers, and don't handle deduplication. For anything beyond a handful of clean cells, copy the data and paste into NumSwift — it extracts every valid phone number in seconds, regardless of formatting.