• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1252
  • Last Modified:

Calculate years and months based on hire-date

I'm trying to figure out how in this cell I can calculate, from the date specified, the number of years + months from that day to "today's date" (the date I'm opening the spreadsheet on).

I've highlighted here in the cell where it'd be ideal to show.

Is this possible or would I have to create another column and display this based on a calculation and change the formatting of the cell/column?


hire-date-excel-example-formula
0
garryshape
Asked:
garryshape
  • 2
  • 2
2 Solutions
 
garryshapeAuthor Commented:
I cam across this.
Any way it can be used within the same cell? Or would it have to be another cell referencing A2?

=DATEDIF(A2,TODAY(),"y")&" y "&DATEDIF(A2,TODAY(),"ym")&" m"
0
 
MacroShadowCommented:
If the value isn't hard coded (in your example it's in A2) it must be in a separate cell.
0
 
MacroShadowCommented:
Using VBA you could have it all in the same cell.
0
 
garryshapeAuthor Commented:
Ok, thanks for that. Just wasn't sure. I'm clueless when it comes to Excel, but I seem to do better finding answers then some people. heh.

Thanks.
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now