Norman Harker said:
More for discussion than otherwise.
Re: How would XL know that 250104 was a date rather than a part number
or your annual salary?
That's correct because Excel uses a date serial number system. If they
had used a separate data type for dates, then it might have been
possible. Even then, if a cell has been pre-formatted to receive
dates, I wonder if Excel's intellisence might have worked to accept it
as a date.
I don't think the data type has as much to do with it as the plethora of
date formats.
While the parser and the display engine are entirely separate, there are
two instances where the Editor affects how entries are parsed:
1) When the cell is formatted as Text, entries are interpreted as text,
not parsed as numeric.
2) When the cell is formatted as Percentage, the input editor adds "%"
to the end of the entry so that, unless it's explicitly deleted, the
parser will then interpret the entry as a percentage.
In principle, I can't think of a reason that a cell formatted as a date
can't be similarly handled by the input editor, which would hand off to
the parser something that looked like a date. However, given the fact
that dates can be entered with two different separators, possibly with a
time (with its own separator), and that months may be numeric or
alphabetic (in multiple languages), I suspect the problem was considered
too complex when XL was designed. Entering dates without separators
would be even more complex - e.g., 111 being one of 1 January 2001, 11
January 2004, 1 November 2004, etc.
Now, of course, I suspect the bigger problem is one of compatibility -
not breaking the tens of millions of working spreadsheets out in the
wild.