Portality


Monday, August 23, 2004


Vent of the day:

Microsoft Excel has some formatting quirks that don't make a whole lot of sense. For example, if you type "1-49", Excel will write out "Jan-49".

If you then format the cell to text instead of a date, it will write out "17899".

Why? Excel treats XX-YY as a date, where XX is a number less than or equal to 12 and YY is a two-digit number. It stores this date by counting the number of days that have passed since January 1, 1900. (January 1, 1949 is 17889 days after January 1, 1900.)

Of course, the way to avoid automatic date formatting is to add an apostrophe before 1-49, since this will treat the entry as text. But still, that was really confusing the first time I tried it.


0 Comments:

Post a Comment

Home