Format a 10-Digit Number as XX-XXX-XXXXX in Excel
Question details
Display a 10-digit number in the pattern XX-XXX-XXXXX without changing its underlying numeric value.

- 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.
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.
Apply a custom number format in Excel
Use this method to display hyphens while keeping the original values numeric.
In Excel, select the cells containing the numbers you want to format.
Right-click the selection and choose Format Cells, or press Ctrl+1.
On the Number tab, select Custom, enter 00-000-00000 in the Type box, and click OK.

Create formatted text with the TEXT function
Use a formula when you need the hyphenated result as text in a separate cell.
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. Open the spreadsheet: Open your workbook in WPS Spreadsheets and select the cells containing the numbers.
- 2. Open cell formatting: Right-click the selected cells and choose Format Cells.
- 3. Apply the custom format: On the Number tab, select Custom, enter 00-000-00000 in the Type box, and click OK.

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.




