[Excel] Dates in a spreadsheet
I've got a spreadsheet that deals with dates and am trying to format a resulting cell to show a specific format. For instance;
In cell C3 there is a start date 1/27/1994
In cell D3 is =TODAY()
And in cell E3 is =(D3 - C3) which is 6637 days
How do I get the resulting cell (E3) to show something like "18 years 2 months 3 days". (Or maybe cell F3 working with the result in E3).
Is this even possible? I'm totally lost when it comes to Excel 2003. Thanks for reading.
I don't believe Excel offers that specific time/date format.
If you were to divide E3 / 365 you'd come up with years. If it needs to be specific you may have to look into scripting something.
Saint Paul, MN
|reply to Cat Scratch | From Here
=DATEDIF(A1,B1,"y")&" years "&DATEDIF(A1,B1,"ym")&" months "&DATEDIF(A1,B1,"md")&" days"
Tested in Excel 2010, don't know if it will work in 2003.
Saint Louis, MO
Yes it works in EXCEL 2003.
Thanks for the link Kilroy.
|reply to Kilroy |
Wow, my Google-fu sucks. I've been looking and reading for hours trying to come up with that one.
Well you see, that exactly is my problem... 'how to formulate Google queries'.
Oh sure, I've been to www.googleguide.com and tried to absorb the info posted. But it doesn't seem sink in. Either I put too much into the query, or not enough. And don't let me get started on how easily distracted I get looking at all the other links that show up (time killers all).
And yes, that site is now bookmarked (at the top) with a couple others dealing with Excel. Thanks