18.11.2014 Views

Microsoft Office

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Using Custom Number Formats 24<br />

Testing Custom Number Formats<br />

When you create a custom number format, don’t overlook the Sample box on the Number tab in the Format<br />

Cells dialog box. This box displays the value in the active cell using the format string in the Type box.<br />

It’s a good idea to test your custom number formats by using the following data: a positive value, a negative<br />

value, a zero value, and text. Often, creating a custom number format takes several attempts. Each time you<br />

edit a format string, it is added to the list. When you finally get the correct format string, access the Format<br />

Cells dialog box one more time and delete your previous attempts.<br />

To make the negative numbers more prominent, you can add a color code to the negative part of the number<br />

format string:<br />

0.00_-;[Red]0.00-<br />

Formatting dates and times<br />

When you enter a date into a cell, Excel formats the date using the system short date format. You can change<br />

this format by using the Windows Control Panel (Regional and Language Options).<br />

Excel provides many useful, built-in date and time formats. Table 24.9 shows some other date and time formats<br />

that you may find useful. The first column of the table shows the date/time serial number.<br />

TABLE 24.9<br />

Useful Built-In Date and Time Formats<br />

Value Number Format Display<br />

39264 mmmm d, yyyy (dddd) July 1, 2007 (Sunday)<br />

39264 “It’s” dddd! It’s Sunday!<br />

39264 dddd, mm/dd/yyyy Sunday, 07/01/2007<br />

39264 “Month: “mmm Month: July<br />

39264 General (m/d/yyyy) 39264 (7/1/2007)<br />

0.345 h “Hours” 8 Hours<br />

0.345 h:mm o’clock 8:16 o’clock<br />

0.345 h:mm a/p”m” 8:16 am<br />

0.78 h:mm a/p”.m.” 6:43 p.m.<br />

CROSS-REF<br />

See Chapter 13 for more information about Excel’s date and time serial number system.<br />

477

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

Saved successfully!

Ooh no, something went wrong!