Negative numbers in Excel
In Excel, the basic way to format negative numbers is to use the Accounting number format.
This option will display your negative number in red.
But for some reports, negative numbers must be displayed with parenthesis. Let's see how to do that.
Customize your number format
To display your negative numbers with parentheses, we must create our own number format.
Open the dialog box "Format Cells" using the shortcut Ctrl + 1 or by clicking on the last option of the Number Format dropdown list.
Code to customize numbers in Excel
Excel can return 4 different display formats for a number. There are parameters for:
- 1st position: Format for Positive value
- 2nd position: Format for Negative value
- 3rd position: Format for Zero
- 4th position: Format for Text
The order of the parameters are:
Positive value;Negative value;Zero;Text
You also need to specify how the number will be returned.
- Use 0 to display number or 0 if empty
- Use # to display number or nothing
For instance, if you have the number 123
- The code #### will return 123
- With the code 0000 the display will be 0123
- And with the code ###0.00 the display will be 123.00
Creation of a custom format
So with this information, we can easily create a format for negative numbers in parentheses.
- For the positive number: ###0.00
- For the negative number in parentheses: (###0.00)
The code you need to enter in the "Type" field is:
And here is the result:
And if you also want to add the color red for those numbers, you just add the color setting in to code between bracket.