Operelio

How to format phone numbers in Excel and for a CRM

To format phone numbers in Excel, select the cells, press Ctrl+1, choose Special > Phone Number, or a custom format such as (000) 000-0000. For a CRM import, write every number in E.164 instead: a +, the country code and the digits, such as +14155550123.

By Operelio team · Updated November 21, 2026 · 9 min read

On this page11 sections
  1. 1How to format phone numbers with the Phone Number format
  2. 2How to add dashes or parentheses with a custom format
  3. 3When the format doesn't apply: numbers stored as text
  4. 4Keep leading zeros and the +
  5. 5The CRM-ready format: E.164
  6. 6How to convert phone numbers to E.164 in Excel
  7. 7When every number is from one country outside the US
  8. 8When the list mixes countries
  9. 9How to format phone numbers in Google Sheets
  10. 10Clean phone numbers across a whole file
  11. 11Frequently asked questions

How to format phone numbers with the Phone Number format

Excel has a built-in format for US phone numbers. It changes how a number is shown, not the number stored in the cell, so 4155550123 still sorts and matches as 4155550123.

  1. Select the cells

    Click the column letter to format the whole column, or select a range.

  2. Open Format Cells

    Press Ctrl+1 (Cmd+1 on a Mac), or right-click the selection and choose Format Cells.

  3. Choose Special > Phone Number

    On the Number tab, click Special in the Category list, then Phone Number in the Type list. If Phone Number isn't there, set Locale (location) to English (United States).

    Excel for Mac's Format Cells dialog on the Number tab: Special is chosen in Category, Phone Number in Type, and Language (Location) is English (United States).
    On a Mac, Locale is called Language (Location).
  4. Click OK

    A 10-digit number such as 4155550123 shows as (415) 555-0123. A 7-digit number shows as 555-0123. The format treats every number as a US one, so a UK mobile stored as 7700900607 shows as (770) 090-0607. In a mixed list, select only the US numbers.

    A Phone column after the Phone Number format: US numbers such as 2065550128 show as (206) 555-0128, UK mobiles show as (770) 090-0607 and (44770) 090-0341, and numbers stored as text, such as 512-555-0184, are unchanged.

How to add dashes or parentheses with a custom format

A custom format lays the digits out however you like. Press Ctrl+1, click Custom in the Category list, type the format in the Type box and click OK. Each 0 stands for one digit.

Custom format4155550123 shows as
(000) 000-0000(415) 555-0123
000-000-0000415-555-0123
000.000.0000415.555.0123
+1 (000) 000-0000+1 (415) 555-0123

When the format doesn't apply: numbers stored as text

A format only changes numbers. A phone number typed or imported as (415) 555-0123 or 415 555 0123 is text, so Format Cells does nothing to it. Cells holding text usually line up on the left, and selecting them shows a Count but no Sum in the status bar.

Strip the brackets, dashes and spaces to leave the digits, with the formula below for a number in A2. Each SUBSTITUTE removes one character, and the two minus signs in front turn the digits that are left into a number. Then apply the Phone Number or custom format to the results.

Excel, any version
=--SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(A2, "(", ""), ")", ""), "-", ""), " ", "")

Keep leading zeros and the +

Excel treats a phone number as a number, so it drops what a number doesn't have. A UK mobile typed as 07700900123 becomes 7700900123, and +447700900123 becomes 447700900123. Numbers longer than 15 digits lose their last digits.

To keep a number exactly as typed, store it as text. Select the column, go to Home, open the Number Format list and choose Text, then type or paste the numbers. For a single cell, type an apostrophe first: '07700900123. The apostrophe doesn't show in the cell.

If the numbers are already stored as numbers, a custom format can put the zero back on screen: 00000 000000 shows 7700900123 as 07700 900123. The cell still holds 7700900123, so a formula, a lookup or a copy into another sheet gets the number without the zero. For a file going into another system, store the numbers as text.

Opening a CSV by double-clicking it can drop the zeros as it opens. Recent versions of Microsoft 365 ask first, in a message that lists conversions such as Remove leading zeros: Convert is the default button and drops them, Don't Convert keeps them. Don't Convert covers only the zeros, not the +: +447700900123 still becomes 447700900123 and shows as 4.477E+11. Older versions drop the zeros without asking.

To keep the + as well, or to choose each column's type yourself, open the file with Data > From Text/CSV instead, click Transform Data, and set the phone column's type to Text before you load it. If Excel asks, choose Replace current, so the earlier automatic change to a number is undone. On a Mac the route is Data > Get Data (Power Query) > Text/CSV, and the columns may come in as text already: click Use First Row as Headers, then set Phone to Text.

Excel for Mac's message on opening a CSV: By default, Excel will perform the following data conversions in this file: Remove leading zeros. Buttons: Convert, Don't Convert.
Microsoft 365 asks before it removes leading zeros from a CSV. Convert is the default.

The CRM-ready format: E.164

A CRM stores the number as you send it, so a list with (415) 555-0123, 415.555.0123 and +1 415 555 0123 imports as three formats. That makes the records harder to search and match, and a dialer or texting tool may not read all of them.

The format that works in all three CRMs below is E.164, the international standard: a +, the country code, then the number with no spaces, brackets or dashes and without the national 0 in front. +14155550123 is the US number above, and +447700900123 the UK mobile. It's never more than 15 digits. Store the column as text so the + stays.

CRMWhat it does with a phone number
HubSpotStores what you send, unless validation is on for the property (Validate phone numbers, on the property's Rules tab). Then a value must be E.164, 4 to 15 digits, with an extension written as +18884827768 ext 123. A default country code you pick there is added only to numbers that arrive by import.
SalesforceStores what you send. Its API reference says client applications are responsible for phone number formatting, so a file of mixed formats lands as mixed formats.
PipedriveStores what you send. Its Convert phone numbers to US format setting rewrites new numbers as (555) 555-1234, but only with the date and time format set to English (United States), and only numbers of ten or more digits written as plain digits or with a +. A number with spaces or dashes isn't converted.

How to convert phone numbers to E.164 in Excel

Use two helper columns: one with each number's digits as text, and one that builds the E.164 number from them. The formulas below assume the original number is in A2.

In B2, get the digits with =REGEXREPLACE(A2,"[^0-9]","") in Microsoft 365. In older versions, use the SUBSTITUTE formula above, add SUBSTITUTE steps for . and +, and leave off the two minus signs. Without them the digits stay text, so a leading 0 survives. Then put the formula for your list in C2 and copy both columns down.

For a list of US and Canada numbers, the formula below adds +1 to a 10-digit number and a + to an 11-digit one that already starts with 1. Anything else comes out as Check, such as a 7-digit number with no area code, so filter C for Check and fix those by hand.

US and Canada numbers, in C2
=IF(LEN(B2)=10,"+1"&B2,IF(AND(LEN(B2)=11,LEFT(B2,1)="1"),"+"&B2,"Check"))

When every number is from one country outside the US

Most countries write numbers at home with a 0 in front, which E.164 drops. For a UK list, the formula below turns a 00 prefix into +, adds a + to a number that already starts with 44, and swaps a leading 0 for +44. For another country, change each 44 to its code. Anything else comes out as Check.

UK numbers, in C2
=IF(LEFT(B2,2)="00","+"&MID(B2,3,15),IF(LEFT(B2,2)="44","+"&B2,IF(LEFT(B2,1)="0","+44"&MID(B2,2,15),"Check")))

When the list mixes countries

A number on its own doesn't say which country it's from, so a mixed list needs a Country column. Make a small table on another tab, named Codes, with a Country column and a Code column: United States and 1, United Kingdom and 44, Germany and 49, and so on for every country in your list. With the country in D2, this formula builds the number:

A number that already starts with + or 00 keeps its own country code. Otherwise the country's code goes in front and a leading 0 is dropped, so 030 1234567 in Germany becomes +49301234567. A country missing from the table comes out as +? at the start, so search C for ? to find them.

Two cases need a look by hand. Italian landlines keep their 0, so 06 1234 5678 in Rome is +390612345678, not +39612345678. And a US number typed with its 1, like 1 415 555 0123, gets the 1 twice, so search the results for +11.

Excel 2021 and Microsoft 365
=IF(LEFT(TRIM(A2),1)="+","+"&B2,IF(LEFT(B2,2)="00","+"&MID(B2,3,15),"+"&XLOOKUP(D2,Codes[Country],Codes[Code],"?")&IF(LEFT(B2,1)="0",MID(B2,2,15),B2)))

How to format phone numbers in Google Sheets

Google Sheets has no built-in phone number format, but custom formats work the same way. Select the cells, go to Format > Number > Custom number format, type (000) 000-0000 and click Apply.

To keep a leading 0 or a +, select the column and choose Format > Number > Plain text before you type or paste the numbers, or start the entry with an apostrophe. File > Import with Convert text to numbers, dates, and formulas checked turns 07700900607 into 7700900607. A number with spaces, brackets, dashes or a + stays text.

For numbers stored as text, REGEXREPLACE leaves the digits: =REGEXREPLACE(TO_TEXT(A2), "[^0-9]", ""). TO_TEXT is there because REGEXREPLACE gives #VALUE! on a cell that holds a number. Wrap the result in VALUE to turn it into a number you can format. It can't bring back a 0 the import already dropped.

Google Sheets' Custom number formats box with (000) 000-0000 typed in and the sample (000) 000-1235 below it, next to Apply.

Clean phone numbers across a whole file

Operelio's CRM Formatter cleans phone numbers as part of preparing a file for HubSpot, Salesforce, Pipedrive and other CRMs. Each number keeps only its digits and a leading +, a 00 prefix becomes +, a (0) after the country code goes, and a trailing extension is dropped, so (415) 555-0123 and 415.555.0123 come out the same, and +44 (0)20 7946 0958 comes out as +442079460958. Italy, San Marino and Vatican City keep the 0, because it is part of the number there, so +39 (0)6 1234 5678 comes out as +390612345678. It doesn't add a country code a number is missing, so a number with its country code comes out in E.164 and one without stays national. A phone value with no digits, such as n/a, is left as it is, so check the column for values like that before you import.

It works on the CSV or Excel file, so there is no number format to lose and no leading zero to put back. Your original file is never changed.

Frequently asked questions

How do I format UK phone numbers in Excel?

Store them as text so the leading 0 stays: format the column as Text before you paste, or type an apostrophe first. If they are already numbers, the custom format 00000 000000 shows 7700900123 as 07700 900123. For a CRM import, +447700900123 is the safest form.

What phone number format does HubSpot need?

HubSpot stores whatever you import unless phone validation is turned on for the property. With it on, every number must be E.164: a +, the country code and 4 to 15 digits, such as +14155550123, with an extension as ext 123. A default country code set on the property is added to imported numbers that lack one.

How do I add +1 to phone numbers in Excel?

Take each number's digits into a helper column with REGEXREPLACE, then add +1 in front of every 10-digit one with a formula like ="+1"&B2. The US and Canada formula in converting phone numbers to E.164 also handles numbers that already have the 1 and marks anything else Check. The result is text, so the + stays.

How do I format all phone numbers the same in Excel?

Strip every number down to its digits with SUBSTITUTE, or REGEXREPLACE in Microsoft 365, then apply one format to the whole column, or use TEXT to write each number out in that format. For a whole file, the CRM Formatter keeps each number's digits and a leading +, turns a 00 prefix into + and drops an extension, in one run. It doesn't add a missing country code.

Next in Spreadsheet cleanup How to import a CSV into Google SheetsImport a CSV into Google Sheets with File > Import: new sheet, append or replace, the separator, and how to keep leading zeros and dates intact.6 min read

Clean every phone number in the file at once.

Free, no credit card required.