Tenure Formula

EvenS8245

New Member
Joined
Mar 25, 2022
Messages
25
Office Version
  1. 2013
Platform
  1. Windows
I am having trouble with an employee tenure formula. I am trying to return the value in a Months / Weeks format.

I have a date of hire and will use the current date. I have found a DatedIf formula but it doesn't seem to be working.

The snip below shows days, but i'm trying to calculate as Months and Weeks.

1655492914843.png
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
you say months and weeks
then you say months and days

Datedif()
will give you years, months , days

did you want weeks ??

so if it is 12months and 3 weeks and 6 days
do you just want to show 12 months and 3 weeks ?

this may work

=DATEDIF(C2,TODAY(),"y") & " years, " & DATEDIF(C2,TODAY(),"ym")
& " months, " & INT(DATEDIF(A2,TODAY(),"md")/7) & " weeks, "
& MOD(DATEDIF(A2,TODAY(),"md"),7) & " days"

Cell Formulas
RangeFormula
D2:D4D2=DATEDIF(C2,TODAY(),"y") & " years, " & DATEDIF(C2,TODAY(),"ym") & " months, " & INT(DATEDIF(A2,TODAY(),"md")/7) & " weeks, " & MOD(DATEDIF(A2,TODAY(),"md"),7) & " days"



I dont normally do this - but here is an external link to explanation of datedif

weeks


can you show what results you expect ??
from those dates in the image
better still
Note: Images are difficult to see , and also requires that I input all the data myself, which is very time consuming.

A SMALL sample spreadsheet, around 10-20 rows, would help a lot here, with all sensitive data removed, and expected results mocked up and manually entered, with a few notes of explanation.

MrExcel has a tool called “XL2BB” that lets you post samples of your data and will allow us to copy/paste your sample data into our Excel spreadsheets, saving a lot of time.

You can also test to see if it works ok, in the "Test Here" forum.

OR if you cannot get XL2BB to work, or have restrictions on your PC , then put the sample spreadsheet onto a share
I only tend to goto OneDrive, Dropbox or google docs , as I'm never certain of other random share sites and possible virus.
Please make sure you have a representative data sample and also that the data has been desensitised, remember this site is open to anyone with internet access to see - so any sensitive / personal data should be removed
 
Last edited:
Upvote 0
Your actual requirements are not clear. You can adapt the following
Are you going to use the results for any calculations?

Datedif.xlsm
CDE
117-Jun-22MonthsWeeks
21-Jun-2202
326-Jun-20233
428-Sep-982842
5
2b
Cell Formulas
RangeFormula
D2:D4D2=DATEDIF(C2,$C$1,"m")
E2:E4E2=INT(($C$1-EDATE(C2,D2))/7)
 
Upvote 0
Solution

Forum statistics

Threads
1,214,652
Messages
6,120,746
Members
448,989
Latest member
mariah3

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top