Formatting Issues

Format a 10-Digit Number as XX-XXX-XXXXX in Excel

Emma BrownEmma Brown Nov 18, 2026 871 views

Question details

Display a 10-digit number in the pattern XX-XXX-XXXXX without changing its underlying numeric value.

Format a 10-Digit Number as XX-XXX-XXXXX in Excel
Product
Microsoft Excel
Device & OS
not provided
Scenario
A user wants to add hyphens to the displayed format of a 10-digit number in a spreadsheet.
Observed behavior
The number should appear in two, three, and five-digit groups while remaining numeric.
Before you start

Check that the cells contain numeric values rather than numbers stored as text. Identify the range you want to format or the source cell for a TEXT formula.

Solution 1Recommended

Apply a custom number format in Excel

Use this method to display hyphens while keeping the original values numeric.

1
Select the cells

In Excel, select the cells containing the numbers you want to format.

2
Open Format Cells

Right-click the selection and choose Format Cells, or press Ctrl+1.

3
Enter the format

On the Number tab, select Custom, enter 00-000-00000 in the Type box, and click OK.

Apply a custom number format in Excel
Display versus value: The hyphens affect only the display. The underlying number remains unchanged, and values with fewer than 10 digits are displayed with leading zeros.
Format numbers in WPS Spreadsheets

Format 10-digit numbers in WPS Spreadsheets

Use a custom number format in WPS Spreadsheets to show hyphens in 10-digit numbers without changing their underlying values.

  1. 1. Open the spreadsheet: Open your workbook in WPS Spreadsheets and select the cells containing the numbers.
  2. 2. Open cell formatting: Right-click the selected cells and choose Format Cells.
  3. 3. Apply the custom format: On the Number tab, select Custom, enter 00-000-00000 in the Type box, and click OK.
Display numbers in the XX-XXX-XXXXX pattern while keeping them numericOpen and edit Microsoft Excel XLS and XLSX filesUse familiar spreadsheet formatting controlsWork with spreadsheets using the free WPS Office suite
microsoft office alternative - wps office

Frequently Asked Questions

Does the custom format change the number stored in Excel?

No. Entering 00-000-00000 under Format Cells > Number > Custom changes only how the number is displayed.

How can I include the hyphens in a text result?

Enter =TEXT(A2,"00-000-00000") in another cell. Replace A2 with the source cell; the formula returns text containing the hyphens.

What happens if a number has fewer than 10 digits?

The custom format displays leading zeros to fill the 10 digit positions. It does not change the underlying value.

Why might the custom format not change my cells?

The entries may be stored as text rather than numbers. Check the cells and convert numeric text to numbers before applying the custom format.