Formatting: Using data styles and numeric formats |
You can use the following standard numeric styles and their options:
Alternatively, you can use a user-defined numeric format. To do this, simply enter the desirable style pattern in the Style dialog. If you need to re-use it, you can save it as a new user style with a new name. To learn more about style patterns, please see how the standard styles are defined. For example, the accounting format is defined as:
_(\$* #,##0.00_);"($"* #,##0.00\);_(\$* \-??_);_(@_)
and the fraction format with the fixed denominator (4) can be defined as:
?\ ?/\4
User-defined formats allow you to specify font colors for numbers that meet some conditions. For example:
[green]#.#;[red]\-#.#;[blue]#.#;[gray]@
displays positive numbers in a green font, negative numbers in red, blue zeroes and gray text labels,
[red][<10]#0.00;[yellow][<=50]#0.0;[green][<400]##0;[magenta][>=400]#00
displays numbers less than 10 in a red font, numbers less or equal to 50 in a yellow font, numbers less than 400 in a green font and numbers greater or equal to 400 using a magenta font.
Color values can be expressed as RGB values (for example, [red][<10]#0.00 is the same as [#FF0000][<10]#0.00) or by one of the following color names:
black | [#000000] | maroon | [#800000] |
green | [#008000] | olive | [#808000] |
navy | [#000080] | purple | [#800080] |
teal | [#008080] | gray | [#808080] |
silver | [#C0C0C0] | red | [#FF0000] |
lime | [#00FF00] | yellow; | [#FFFF00] |
blue | [#0000FF] | fuchsia | [#FF00FF] |
aqua | [#00FFFF] | white | [#FFFFFF] |