excel中超过24小时的时间换算成秒
答案:6 悬赏:30 手机版
解决时间 2021-02-16 09:26
- 提问者网友:嘚啵嘚啵
- 2021-02-15 09:32
excel中超过24小时的时间换算成秒
最佳答案
- 五星知识达人网友:山有枢
- 2021-02-15 09:55
如果时间数据在A1中,折算成秒数的公式为
=TEXT(A1,"[s]")
或
=A1*86400
单元格格式设置为常规.
如果时间为你后来显示的这种不为电脑认可的时间0小时39分钟47秒
,公式可为
=TEXT(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(A1,"小时",":"),"分钟",":"),"秒",),"[s]")
公式返回的是文本类型的数字,如果后续还要参与计算,公式可改为
=--TEXT(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(A1,"小时",":"),"分钟",":"),"秒",),"[s]")
=TEXT(A1,"[s]")
或
=A1*86400
单元格格式设置为常规.
如果时间为你后来显示的这种不为电脑认可的时间0小时39分钟47秒
,公式可为
=TEXT(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(A1,"小时",":"),"分钟",":"),"秒",),"[s]")
公式返回的是文本类型的数字,如果后续还要参与计算,公式可改为
=--TEXT(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(A1,"小时",":"),"分钟",":"),"秒",),"[s]")
全部回答
- 1楼网友:鱼芗
- 2021-02-15 13:20
A列要用文本格式,数据列用数值
=MId(A1,1,2)*3600+MId(A1,4,2)*60+MId(A1,7,2)
- 2楼网友:山河有幸埋战骨
- 2021-02-15 13:02
=(A1-time(00,00,00))*86400
注=(B2-A2)*86400 两个时间之间的总秒数
注=(B2-A2)*86400 两个时间之间的总秒数
- 3楼网友:woshuo
- 2021-02-15 12:17
没那么复杂了!算个“秒数”嘛,直接乘以86400!再设置成常规格式,百试不爽!!一天多少秒?!=24*60*60,86400 !!!!!!!因为单元格实际是按天存储的。
- 4楼网友:深街酒徒
- 2021-02-15 10:51
数据在A列,在A1输入公式,下拉
=IF(--LEFt(A4,FIND("小时",A4)-1)=0,0,INT(--LEFt(A4,FIND("小时",A4)-1)/24)*24*60*60)+MINUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(A4,"小时",":"),"分钟",":"),"秒",""))*60+SECOND(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(A4,"小时",":"),"分钟",":"),"秒",""))+HOUR(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(A4,"小时",":"),"分钟",":"),"秒",""))*60*60
=IF(--LEFt(A4,FIND("小时",A4)-1)=0,0,INT(--LEFt(A4,FIND("小时",A4)-1)/24)*24*60*60)+MINUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(A4,"小时",":"),"分钟",":"),"秒",""))*60+SECOND(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(A4,"小时",":"),"分钟",":"),"秒",""))+HOUR(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(A4,"小时",":"),"分钟",":"),"秒",""))*60*60
- 5楼网友:夜风逐马
- 2021-02-15 10:14
(1)A1 = 99:09:09
用你自己的公式,只需要在前面加上一个DAY(A1)*24*3600+你的公式就行了,这样你容易理解,即 =DAY(A1)*24*3600+HOUR(A1)*3600+MINUTE(A1)*60+SECOND(A1)
但是,这样计算出来可能会显示 356949:00:00 ,所以 用一个VALUE()函数就直接显示为秒了,即 =VALUE(DAY(A1)*24*3600+HOUR(A1)*3600+MINUTE(A1)*60+SECOND(A1)) 显示 356949
一个简单的公式: =VALUE(A1*24*3600)
或:=VALUE(TEXT(A1,"[s]"))
(2)前面有很多高手的公式都可以用,所以我按你的公式来解:
假定你输入A1 = 70小时39分钟47秒
=LEFt(A1,FIND("小时",A1)-1)*3600
+MId(A1,FIND("小时",A1)+2,FIND("分钟",A1)-FIND("小时",A1)-2)*60
+MId(A1,FIND("分钟",A1)+2,FIND("秒",A1)-FIND("分钟",A1)-2)
分为3行便于查看和分析
不过
=TEXT(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(A1,"小时",":"),"分钟",":"),"秒",),"[s]")
比较简单,结果是文本格式,用VALUE()转为数字格式
即:
=VALUE(TEXT(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(A1,"小时",":"),"分钟",":"),"秒",),"[s]"))
用你自己的公式,只需要在前面加上一个DAY(A1)*24*3600+你的公式就行了,这样你容易理解,即 =DAY(A1)*24*3600+HOUR(A1)*3600+MINUTE(A1)*60+SECOND(A1)
但是,这样计算出来可能会显示 356949:00:00 ,所以 用一个VALUE()函数就直接显示为秒了,即 =VALUE(DAY(A1)*24*3600+HOUR(A1)*3600+MINUTE(A1)*60+SECOND(A1)) 显示 356949
一个简单的公式: =VALUE(A1*24*3600)
或:=VALUE(TEXT(A1,"[s]"))
(2)前面有很多高手的公式都可以用,所以我按你的公式来解:
假定你输入A1 = 70小时39分钟47秒
=LEFt(A1,FIND("小时",A1)-1)*3600
+MId(A1,FIND("小时",A1)+2,FIND("分钟",A1)-FIND("小时",A1)-2)*60
+MId(A1,FIND("分钟",A1)+2,FIND("秒",A1)-FIND("分钟",A1)-2)
分为3行便于查看和分析
不过
=TEXT(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(A1,"小时",":"),"分钟",":"),"秒",),"[s]")
比较简单,结果是文本格式,用VALUE()转为数字格式
即:
=VALUE(TEXT(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(A1,"小时",":"),"分钟",":"),"秒",),"[s]"))
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯