Calculate number of months according to joined date & current date

onin18

New Member
Joined
Jan 5, 2013
Messages
23
Base on my sheet the M7 cell which the joined date have got a formula like this =VLOOKUP($C$3,VALIDATION!$A$2:$M$500,9,FALSE), so when I choose in C3 (drop-down list, different employee number will show) & the joined date in cell M7 will change, so from there the number of months in J11 will change according to the joined date. IF M7 GOT 1/3/2011 joined date (IT NEED TO BE CHANGE AS 1/3/2013 [2013 'coz preivous year of this year) SUBTRACT TO TODAY DATE 25/10/2014 SO I NEED THE ANSWER OF 19MONTHS (because 1/3/2013 to 1/3/2014 = 12 months or 1 year then + from 1/3/2014 to today date 26/10/2014 = 7 months so MUST BE TOTAL OF 12+7 = 19MONTHS... then only I can count how many entitled leave they can have to date. Somebody give me the formula it work only if the joined date is the same as this year 2014. but if need to count also from 2013 to 2014 (if employee is an old worker) then it has an error and it shows everytime is 15. I really need this badly. thank you.. Here's the formula..


=IF(YEAR(TODAY())>YEAR(M7),((YEAR(TODAY())-YEAR(DATE(YEAR(TODAY())-1,MONTH(M7),1)))*12)+(MONTH(TODAY())-MONTH(YEAR(DATE(YEAR(TODAY())-1,MONTH(M7),1)))),MONTH(TODAY())-MONTH(M7))
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
I don't understand why you change 1/3/11 to 1/3/13, but here is how to get the months between 2 dates.

Excel Workbook
ABC
11/03/201325/10/201419
Sheet5
 
Upvote 0
Hello,
Onin please stop double posting

function fixed
=IF(YEAR(NOW())>YEAR(A5),((YEAR(NOW())-YEAR(DATE(YEAR(NOW())-1,MONTH(A5),1)))*12)+(MONTH(NOW())-MONTH(A5)),MONTH(NOW())-MONTH(A5))

Regards
Saeed
 
Upvote 0
Here another quick fix way, if you want months & 2 decimal places
=TEXT(((TODAY()-A1))/(365/12),"0.00")
19.82 Months
 
Upvote 0
So sorry if i post again... Just so desperate to get the answer thank you very much... It already work... Sorry again...
 
Upvote 0

Forum statistics

Threads
1,214,653
Messages
6,120,750
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