Create and apply a custom number format

If a built-in number format does not meet your needs, you can create a new number format that is based on an existing number format and add it to the list of custom number formats. For example, if you're creating a spreadsheet that contains customer information, you can create a number format for telephone numbers. You can apply the custom number format to a string of numbers in a cell to format them as a telephone number.

Important: Custom number formats affect only the way a number is displayed and do not affect the underlying value of the number. Custom number formats are stored in the active workbook and are not available to new workbooks that you open. For more information about changing the settings for new workbooks, see Control how workbooks and sheets are created.

Do any of the following:

Create a custom number format

On the Home tab, under Number, on the Number Format pop-up menu
, click Custom.

In the Format Cells dialog box, under Category, click Custom.

In the Type list, select the built-in format that most resembles the one that you want to create. For example, 0.00.

The number format that you select appears in the Type box.

In the Type box, modify the number format codes to create the exact format that you want. For example, 000-000-0000.

Your changes will not alter the built-in format. Instead, your changes create a new custom number format.

When you have finished, click OK.

Apply a custom number format

Select the cell or range of cells that you want to format.

On the Home tab, under Number, on the Number Format pop-up menu
, click Custom.

In the Format Cells dialog box, under Category, click Custom.

At the bottom of the Type list, select the built-in format that you just created. For example, 000-000-0000.

The number format that you select appears in the Type box.

Click OK.

Delete a custom number format

On the Home tab, under Number, on the Number Format pop-up menu
, click Custom.

In the Format Cells dialog box, under Category, click Custom.

In the Type list, select the custom number format, and then click Delete.

Notes:

Built-in number formats cannot be deleted.

Any cells in the workbook that were formatted with the deleted custom format will be displayed in the default General format.