Excel: Date/Time Format Changes When Value in Cell Changes

Last reviewed: November 30, 1994
Article ID: Q81656
The information in this article applies to:
  • Microsoft Excel for Windows, versions 4.0, 4.0a, 5.0
  • Microsoft Excel for the Macintosh, versions 4.0, 5.0

SUMMARY

Microsoft Excel provides a Smart Formatting feature that automatically changes the format for a cell to one appropriate to the value in the cell. After changing the date or time value in a cell, the format for the cell will automatically change if the cell was originally formatted with one of Excel's built-in formats.

MORE INFORMATION

Smart Formatting only works with Excel's built-in number formats and can, therefore, be bypassed by using a custom format. Keep in mind that a custom format that is identical to a built-in format will be considered a built-in format in Excel.

For example, if you format a cell with the custom format hh:mm AM/PM and then enter 3/06/92 2:45 PM into that cell, Excel will display 2:45 PM without the date. If, on the other hand, you format the cell with the built-in format h:mm AM/PM and enter the same date and time, Excel will reformat the cell to mm/dd/yyyy h:mm.


KBCategory: kbusage
KBSubcategory:

Additional reference words: 5.00 4.0 4.00


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: November 30, 1994
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.