![]() |
calculating years/months with YEARFRAC?
Hello,
I'm using the =Yearfrac formula to calculate tenure. It returns the result in years and fractions of years; e.g., 5.5 yrs. Is there any way that the interval between two dates can be calculated in years and months, so that I get 5yrs 6months? thanks! |
calculating years/months with YEARFRAC?
You could use the DATEDIF function. =DATEDIF(A1,NOW(),"y") & " yrs, " & DATEDIF(A1,NOW(),"ym") & " months" HTH, Steve -- SteveG ------------------------------------------------------------------------ SteveG's Profile: http://www.excelforum.com/member.php...fo&userid=7571 View this thread: http://www.excelforum.com/showthread...hreadid=514994 |
calculating years/months with YEARFRAC?
Hi
Try =DATEDIF(earlydate,latedate,"y")&" years "&DATEDIF(earlydate,latedate,"ym")&" months" For more information on the undocumented datedif function, take a look at Chip Pearson's site http://www.cpearson.com/excel/datedif.htm -- Regards Roger Govier Stilla wrote: Hello, I'm using the =Yearfrac formula to calculate tenure. It returns the result in years and fractions of years; e.g., 5.5 yrs. Is there any way that the interval between two dates can be calculated in years and months, so that I get 5yrs 6months? thanks! |
calculating years/months with YEARFRAC?
WOW! This is like magic!!! THANK YOU!!!
"SteveG" wrote: You could use the DATEDIF function. =DATEDIF(A1,NOW(),"y") & " yrs, " & DATEDIF(A1,NOW(),"ym") & " months" HTH, Steve -- SteveG ------------------------------------------------------------------------ SteveG's Profile: http://www.excelforum.com/member.php...fo&userid=7571 View this thread: http://www.excelforum.com/showthread...hreadid=514994 |
calculating years/months with YEARFRAC?
Thanks Roger! works perfectly!
"Roger Govier" wrote: Hi Try =DATEDIF(earlydate,latedate,"y")&" years "&DATEDIF(earlydate,latedate,"ym")&" months" For more information on the undocumented datedif function, take a look at Chip Pearson's site http://www.cpearson.com/excel/datedif.htm -- Regards Roger Govier Stilla wrote: Hello, I'm using the =Yearfrac formula to calculate tenure. It returns the result in years and fractions of years; e.g., 5.5 yrs. Is there any way that the interval between two dates can be calculated in years and months, so that I get 5yrs 6months? thanks! |
All times are GMT +1. The time now is 06:39 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com