Microsoft Office Tutorials and References
In Depth Information
Chapter 15: Digging Up the Facts
You can format cells in many ways. When the first argument to CELL is
format, a code is returned that corresponds to the formatting. The possible
formats are those found in the Format Cells dialog box. Table 15-2 shows the
formats and the code that CELL returns.
Returned Values for the format Argument
Table 15-2
Format
Returned Value from CELL Function
General
G
0
F0
#,##0
,0
0.00
F2
#,##0.00
,2
$#,##0_);($#,##0)
C0
$#,##0_);[Red]($#,##0)
C0$#,##0.00_);($#,##0.00)
C2
$#,##0.00_);[Red]
($#,##0.00)
C20%
P0
0.00%
P2
0.00E+00
S2
# ?/? or ??/??
G
m/d/yy or m/d/yy h:mm or mm/
dd/yy
D4
d-mmm-yy or dd-mmmm-yy
D1
d-mmm or dd-mmm
D2
mmm-yy
D3
mm/dd
D5
h:mm AM/PM
D7
h:mm:ss AM/PM
D6
h:mm
D9
h:mm:ss
D8
Using CELL with the format argument lets you add a bit of smarts to your
worksheet. Figure 15-2 shows an example of CELL making sure information is
Search JabSto ::




Custom Search