Microsoft Office Tutorials and References
In Depth Information
Formatting numbers
specific numeric ranges so that, for example, all values greater than or less than a specified
value appear in a different color.
Create custom billing and part number formats
Suppose you create a billing statement and you want to format the totals in the
Amount Due column so that they display differently depending on the value in each
cell. You might create the Custom Billing format shown in Figure 9-43, which was
created using the following code:
"Amount due: "$#,##0.00_);"Credit: "($#,##0.00);"Let's call it even. ";"Please
note: "@
Suppose you’re creating an inventory worksheet and you want all the entries in a
particular column to appear in the format Part # XXX-XXXX , shown as the Custom Part #
format in Figure 9-43, which was created using the following code:
"Part # "###-####
Using this code lets you type your part numbers as actual numbers rather than as text
entries, which happens if you include any non-numeric characters, including dashes.
This way, you can sort your part numbers properly and otherwise manipulate them as
numeric data.
Note
You can create codes that assign different colors based on the value in the cell, but
an easier way is built into Excel: You can use the Conditional Formatting menu on the
Home tab on the ribbon. For more information, see “Formatting conditionally” earlier
in this chapter.
To change the color of an entry, type the name of the new color in brackets in front of each
segment of code. For example, if you want to apply a blue Currency format with two
decimal places, edit the $#,##0.00_);($#,##0.00) format as follows:
[Blue]$#,##0.00_);($#,##0.00)
When you apply this format to a worksheet, positive and zero values appear in blue, and
text and negative values appear as usual, in black. The following simple four-part format
code displays positive values in blue, negative values in red, zero values in yellow, and text
in green (with no additional number formatting specified):
[Blue];[Red];[Yellow];[Green]
Search JabSto ::




Custom Search