Sign in with Microsoft
Sign in or create an account.
Hello,
Select a different account.
You have multiple accounts
Choose the account you want to sign in with.
Number format codes - Microsoft Support
Learn how to use number formats to change the appearance of numbers, dates, and times in Excel without affecting the cell value. Find out how to create custom number formats with four sections of code and examples of different formats.
Applies To: Excel for Microsoft 365 for Mac, Excel 2021 for Mac, Excel 2019 for Mac
Create and apply a custom number format - Microsoft Support
Display numbers as postal codes, Social Security numbers, or phone numbers. If a built-in number format does not meet your needs, you can create a new custom number format that is based on an existing number format and add it to the list of custom number formats.
Applies To: Excel for Microsoft 365 for Mac, Excel 2021 for Mac, Excel 2019 for Mac
Quick Start: Format numbers in a worksheet - Microsoft Support
To see the number format code for a built-in number format, click the Custom category, and look in the Type box. For example, the code [<=9999999]###-####;(###) ###-#### is used to display the phone number (555) 555-1234. For more information, see Create or delete a custom number format.
Applies To: Excel for Microsoft 365, Excel 2021, Excel 2019, Excel 2016, Excel 2013
Review guidelines for customizing a number format
A number format can have up to four sections of code, separated by semicolons. These code sections define the format for positive numbers, negative numbers, zero values, and text, in that order. <POSITIVE>;<NEGATIVE>;<ZERO>;<TEXT>. For example, you can use these code sections to create the following custom format:
Applies To: Excel for Microsoft 365, Excel 2021, Excel 2019, Excel 2016, Excel 2013
Quick Start: Format numbers in a worksheet - Microsoft Support
To see the number format code for a built-in number format, click the Custom category, and look in the Type box. For example, the code [<=9999999]###-####; (###) ###-#### is used to display the phone number (555) 555-1234. For more information, see Create or delete a custom number format. Top of Page.
Applies To: Excel for Microsoft 365, Excel 2021, Excel 2019, Excel 2016, Excel 2013