R
Russell Bachmann
Hello,
I have been having a difficult time calculating the difference between 2
dates. Specifically, the start date of an employee and todays date. I want
to calculate how long they have been there for reviews etc. I got the
formula below from a microsoft site but it only gives me 0,
years,6months,22.44237... days. I'm trying to get rid of all of those number
after the decimal. Can you help?
//Russ
(e-mail address removed)
=YEAR(A2)-YEAR(A1)-IF(OR(MONTH(A2)<MONTH(A1),AND(MONTH(A2)=MONTH(A1),
DAY(A2)<DAY(A1))),1,0)&" years, "&MONTH(A2)-MONTH(A1)+IF(AND(MONTH(A2)
<=MONTH(A1),DAY(A2)<DAY(A1)),11,IF(AND(MONTH(A2)<MONTH(A1),DAY(A2)
0 years,6 months,22.442376620369 days
I have been having a difficult time calculating the difference between 2
dates. Specifically, the start date of an employee and todays date. I want
to calculate how long they have been there for reviews etc. I got the
formula below from a microsoft site but it only gives me 0,
years,6months,22.44237... days. I'm trying to get rid of all of those number
after the decimal. Can you help?
//Russ
(e-mail address removed)
=YEAR(A2)-YEAR(A1)-IF(OR(MONTH(A2)<MONTH(A1),AND(MONTH(A2)=MONTH(A1),
DAY(A2)<DAY(A1))),1,0)&" years, "&MONTH(A2)-MONTH(A1)+IF(AND(MONTH(A2)
<=MONTH(A1),DAY(A2)<DAY(A1)),11,IF(AND(MONTH(A2)<MONTH(A1),DAY(A2)
"&A2-DATE(YEAR(A2),MONTH(A2)-IF(DAY(A2)<DAY(A1),1,0),DAY(A1))&" days"=DAY(A1)),12,IF(AND(MONTH(A2)>MONTH(A1),DAY(A2)<DAY(A1)),-1)))&" months,
0 years,6 months,22.442376620369 days