The Format Cells dialog offers so many options available “out-of-the-box.” The available format category and type options go far beyond the basics.
But, if what is available still doesn’t meet your requirements, you can always create a custom format.
Let’s consider a set of numbers.
We start by opening the Format Cells dialog box as we did before. This time we will select Custom from the Category list.
Then we select from the Type list.
If we want to build our own custom currency format, one of the first things we can do is add a dollar sign.
We can type that into the Type text box.
One of the things you can customize is the color of your type font.
You do this by preceding your number format with the color name enclosed in square brackets.
We add blue type font formatting to our current format.
The preview in the Sample box does not show color changes.
We must click OK to see the change.
So far, we have only worked with number formats that consist of one section of code.
Using semicolons to separate, we can have up to four of these code sections.
This means that we can do something like format both positive and negative numbers.
For instance, we may want our negative numbers to show up red font. This will be a good contrast to the blue we have set for positive numbers.
We could also have negative numbers shown in parentheses.
We can even go a step further and set a third code section for zero values.
This will now change our list of numeric values to something more meaningful.
This is a great demonstration of the flexibility custom number formatting offers. But let’s go even a step further.
Custom formatting even allows you to add text to your formats.
You could be even more descriptive based on whether your values are positive or negative.
You can do this by adding text by enclosing the custom string in double quotes.
We have added the text “ Profit” to the end of our positive values. We have also added the text “ Loss” to the end of our negative values.
Pay attention to the spaces after the opening double quote and the first letter of each string.
Without these leading spaces, there would be no space between the numeric value and the text.
Now our updated custom format codes yield the following results.