I'm sorry that you interpreted my request for more information as "semantics"
and took offense to it. Sometimes when you're asking for free help, you have to
put up with crotchety old people like me. Fortunately the additional information
you provided in your response should be enough to solve the problem.
Excel is converting the data from your text file as best it can. When it sees
the field "10 Jan 1955", it recognizes it as a date, and converts it as such. As
I said previously, dates to Excel are the number of days since Jan 1, 1900. So
Excel will convert your field to the number 20,099 and store it in the cell.
When it sees only "1955" in a field, it recognizes this as a number, and simply
stores that number in the cell.
Now when you apply your format to the field, Excel has no way of knowing where
the number originally came from. It simply looks at the number in the cell,
determines how many days have elapsed since Jan 1, 1900 and displays the
appropriate date. So 20,099 will be displayed as "10 January 1955", which is
what you want, but 1955 will be displayed as "8 May 1905" because May 8th, 1905
is 1955 days from the start of the century. If your original data was the year
1966, Excel would display this as "19 May 1905".
You can solve your problem using a custom format like:
[<2100]####;d mmmm yyyy
This tells Excel: If the number in the cell is less than 2100 (which would
happen if your source data was only the year), display it as a four digit
number; if it's anything else, display it in long date format.
Hope this helps
Fred
Frustrated said:
I don't need someone arguing "semantics" with me (!)
My customized Excel date format in the date column of cells reads: d mmmm
yyyy. This only works when the date in the text file that it is "reading"
the data from has a date that reads: 10 Jan 1955. If the text file only has
the year because the exact date is unknown, the custom format doesn't work.
I need a formula/format in the date column cells that will accommodate both
types of data entry. The excel file is merged with a variety of label files
in Word.
If you don't understand this, then perhaps someone else does!
Thanks....