Formatting dates and times
You have a great deal of flexibility in formatting cells that contain dates and times. For example,
you can format the cell to display the date part only, the time part only, or both the date and
time parts.
You format dates and times by selecting the cells and then using the Number Format control in
the Home➜Number group (see Figure 6-1). This control offers two date formats and one time
format.
Figure 6-1: Use the Number Format drop-down list to change the appearance of dates and times.
When you create a formula that refers to a cell containing a date or a time, Excel may
automatically format the formula cell as a date or a time. Sometimes, this is very help-
ful; other times, it’s completely inappropriate and downright annoying. Unfortunately,
you cannot turn off this automatic date formatting. You can, however, use a shortcut
key combination to remove all number formatting from the cell and return to the
default General format. Just select the cell and press Ctrl+Shift+~.
If none of the built-in formats meet your needs, you can create a custom number format. Select
the More Number Formats option from the Number Format drop-down list to display the Number
tab in the Format Cells dialog box. The Date and Time categories provide many additional for-
matting choices. If none of these are satisfactory, select the Custom category and type the cus-
tom format codes into the Type box. (See Appendix B for information on creating custom
number formats.)
You have a great deal of flexibility in formatting cells that contain dates and times. For example,
you can format the cell to display the date part only, the time part only, or both the date and
time parts.
You format dates and times by selecting the cells and then using the Number Format control in
the Home➜Number group (see Figure 6-1). This control offers two date formats and one time
format.
Figure 6-1: Use the Number Format drop-down list to change the appearance of dates and times.
When you create a formula that refers to a cell containing a date or a time, Excel may
automatically format the formula cell as a date or a time. Sometimes, this is very help-
ful; other times, it’s completely inappropriate and downright annoying. Unfortunately,
you cannot turn off this automatic date formatting. You can, however, use a shortcut
key combination to remove all number formatting from the cell and return to the
default General format. Just select the cell and press Ctrl+Shift+~.
If none of the built-in formats meet your needs, you can create a custom number format. Select
the More Number Formats option from the Number Format drop-down list to display the Number
tab in the Format Cells dialog box. The Date and Time categories provide many additional for-
matting choices. If none of these are satisfactory, select the Custom category and type the cus-
tom format codes into the Type box. (See Appendix B for information on creating custom
number formats.)
No comments:
Post a Comment