简体   繁体   中英

How Calculate Average Of Minutes and Seconds In Excel

My raw data in column B each on a new line looks like this:- 5.04,3.57,0.58,10.01 Left of. is minutes and right of. is seconds. I need to calculate the average of my data. How do I go about this?

You need to convert to a true time; one option is to use TIME and parse the raw data:

In a new column, use:

 =TIME(,LEFT(B1,FIND(".",B1)),MID(B1,FIND(".",B1)+1,999))

在此处输入图像描述

Another option is to use TIMEVALUE :

=TIMEVALUE("00:"&SUBSTITUTE(TEXT(B5,"00.00"),".",":"))

在此处输入图像描述

EDIT :

Use TEXT to force the raw times to retain a trailing zero when parsing:

 =TIMEVALUE("00:"&SUBSTITUTE(TEXT(B5,"00.00"),".",":"))

在此处输入图像描述

Another option, probably the best one actually, is just a bit of math:

 =TIME(,TRUNC(B1),(B1-TRUNC(B1))*100)

在此处输入图像描述

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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