计算人的年龄,为什么要用自定义函数呢?直接用datedif函数就很方便呀如A1为出生日期,B1公式=datedif(a1,today(),"y")这样就得到了年龄
Function Age(iBirth As Integer) As Integer Age = year(Now) - iBirthEnd Function