[英]Calculate age average from age in month day format
I have ages in month.day format like this: 我在month.day格式中有这样的年龄:
35,24
36,11
36,19
37,18
35,12
37,04
35,20
36,01
35,26
36,05
36,16
37,28
for example for the first entry, the age is 35 months and 24 days. 例如,对于第一次输入,年龄是35个月零24天。 How can I average them all to get a proper age average in the same format?
我如何才能对它们全部求平均以得到相同格式的适当年龄平均数?
Thanks 谢谢
Here is a rough approximation: 这是一个大概的近似值:
My formula in B14: 我在B14中的公式:
=ROUNDDOWN((SUM(B2:B13)*30.5+SUM(C2:C13))/(ROW(B14)-2)/30.5, 0)
My formula in C14: 我在C14中的公式:
=ROUNDDOWN((SUM(B2:B13)*30.5+SUM(C2:C13))/(ROW(B14)-2)-(B14*30.5), 0)
If it can be reasonably assumed that a month is equal to 30 days then the following will return an average in the form of mm,dd . 如果可以合理地假设一个月等于30天,则以下结果将以mm,dd的形式返回平均值。
=INT((SUMPRODUCT(LEFT(A2:A13, FIND(",", A2:A13)-1)*30+MID(A2:A13, FIND(",", A2:A13)+1, 99))/ROWS(A2:A13))/30)&
","&
INT(MOD((SUMPRODUCT(LEFT(A2:A13, FIND(",", A2:A13)-1)*30+MID(A2:A13, FIND(",", A2:A13)+1, 99))/ROWS(A2:A13)),30))
Upon doing the question on STDDEV I found I just need to change to average to get the answer for this: 在对STDDEV进行问题后,我发现我只需要更改为平均值即可得到答案:
=QUOTIENT(AVERAGE(LEFT(A1:A12,2)*30 + RIGHT(A1:A12,2)),30)&","&ROUND(MOD(AVERAGE(LEFT(A1:A12,2)*30 + RIGHT(A1:A12,2)),30),2)
It is an array formula so it needs to be confirmed with Ctrl-Shift-Enter. 这是一个数组公式,因此需要使用Ctrl-Shift-Enter进行确认。 You can change the rounding on the days to what every you want by changing the last number in the formula.
您可以通过更改公式中的最后一个数字,将天数舍入为所需的每一天。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.