简体   繁体   English

Excel-如何通过“月龄”计算年龄

[英]Excel - how to calculate age from 'Age in Months'

If a person's age in months is 140 how could I calculate there age in Years and Months? 如果一个人的月龄是140岁,我如何计算年和月的年龄?

So for example I would want to see: 因此,例如,我希望看到:

11 Years 8 Months 11年8个月

To get the months: =MOD(140,12) 要获取月份: =MOD(140,12)

To get the years: =ROUNDDOWN(140/12,0) 获取年份: =ROUNDDOWN(140/12,0)

Putting it together =ROUNDDOWN($A$1/12,0) & " Years " & MOD($A$1,12) & " Months" where $A$1 holds the value (140). 放在一起=ROUNDDOWN($A$1/12,0) & " Years " & MOD($A$1,12) & " Months"其中$ A $ 1保留值(140)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM