Oops. I missed that it's a two-digit year. Thanks for picking that up,
combo.
So for mine it should be
[tab][COLOR=blue white]=Date(A1 + 100, A2, A3)[/color]
to return 200X.
Or if you are dealing with data from the 1900s and the 2000s, you'll need to come up with a way to decide whether to add 100 or not, like If formula. Something like:
[tab][COLOR=blue white]=Date(if(A1 < 11, A1 + 100, A1), A2, A3)[/color]
But
Skip is absolutely right (as he almost invariably is) in that you should understand how Excel deals with dates/times.
- - - - - - - -
[Purely academic curiosity]
xlbo said:
Mine just converts to a string so no need to format it...
Even though you're returning a string, Excel seems to recognize that it is a date. Let's say that A1=1 A2=2 A3=3.
In B1, type in [COLOR=blue white]=A2&"/"&A3&"/"&A1[/color]
B1 now shows "2/2/1"
In another cell, put in [COLOR=blue white]=B1+1[/color]
That returns 36925, the serial number for 2/3/2001.
If you change the formatting of B1 to Date it does not change the appearance of cell B1. But if you
then put [COLOR=blue white]=B1+1[/color] in a different cell (after having changed the format of B1), it will return 2/3/2001 straight away.
I just thought that was interesting. But I'm probably wrong.
[/Purely academic curiosity]
[tt]_____
[blue]-John[/blue][/tt]
[tab][red]The plural of anecdote is not data[/red]
Help us help you. Please read
FAQ 181-2886 before posting.