18.11.2014 Views

Microsoft Office

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Using Custom Number Formats 24<br />

Code<br />

Comments<br />

_ (underscore)<br />

“text”<br />

@<br />

[color]<br />

Leaves a space equal to the width of the next character.<br />

Displays the text inside the double quotation marks.<br />

Text placeholder.<br />

Displays the characters in the color specified. Can be any of the following text strings (not case<br />

sensitive): Black, Blue, Cyan, Green, Magenta, Red, White, or Yellow.<br />

[Color n] Displays the corresponding color in the color palette, where n is a number from 0 to 56.<br />

[condition value]<br />

Enables you to set your own criterion for each section of a number format.<br />

Table 24.4 lists the codes used to create custom formats for dates and times.<br />

TABLE 24.4<br />

Codes Used in Creating Custom Formats for Dates and Times<br />

Code<br />

Comments<br />

m Displays the month as a number without leading zeros (1–12).<br />

mm Displays the month as a number with leading zeros (01–12).<br />

mmm<br />

mmmm<br />

mmmmm<br />

Displays the month as an abbreviation (Jan–Dec).<br />

Displays the month as a full name (January–December).<br />

Displays the first letter of the month (J–D).<br />

d Displays the day as a number without leading zeros (1–31).<br />

dd Displays the day as a number with leading zeros (01–31).<br />

ddd<br />

dddd<br />

Displays the day as an abbreviation (Sun–Sat).<br />

Displays the day as a full name (Sunday–Saturday).<br />

yy or yyyy Displays the year as a two-digit number (00–99) or as a four-digit number (1900–9999).<br />

h or hh<br />

Displays the hour as a number without leading zeros (0–23) or as a number with leading zeros<br />

(00–23).<br />

m or mm<br />

Displays the minute as a number without leading zeros (0–59) or as a number with leading<br />

zeros (00–59).<br />

s or ss<br />

Displays the second as a number without leading zeros (0–59) or as a number with leading<br />

zeros (00–59).<br />

[ ] Displays hours greater than 24 or minutes or seconds greater than 60.<br />

AM/PM<br />

Displays the hour using a 12-hour clock; if no AM/PM indicator is used, the hour uses a<br />

24.hour clock.<br />

471

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!