添加持续时间 [英] Adding time durations

查看:131
本文介绍了添加持续时间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在该主题上看到的所有内容都与时钟时间有关,例如,如果我将30分29秒添加到下午3点会变成什么时间?但是我还没有看到可以满足我特定要求的问题或答案.

这里是.我正在尝试使用Excel来累计和总计CD上的曲目计时.因此,我输入每个曲目的时间,例如5:23、4:08、6:45,依此类推,分别在B行中的每一行中输入.行A包含曲目中歌曲的名称. />
我对获取AM或PM时钟时间结果不感兴趣.我希望从累积所有曲目中获得CD的总时间.显然,我给出的示例的结果应为16:16(16分16秒),因为分钟总计为15,而秒总计为76,这将使分钟增加一分钟.分钟(76-60 = 16),即16分钟,剩下16秒.

有Internet计算器可以执行此操作,但是我没有在Excel中找到任何方法可以执行此操作,而且我还没有找到任何人甚至问过这个问题.

Everything I''ve seen on this subject pertains to clock time, as in what would the time be if I added 30 minutes and 29 seconds to 3 PM? But I''ve yet to see a question or answer that addresses my particular requirement.

Here it is. I''m trying to use Excel to add up and total the timings of tracks on a CD. So, I enter the time of each track, like 5:23, 4:08, 6:45, and so on, each in its own row in row B. Row A contains the name of the song on the track.

I''m not interested in getting an AM or PM clock time result. I want the total time of the CD from accumulating all of the tracks. Obviously, the result of the example I''ve given should come out to 16:16 (16 minutes and 16 seconds) because the minutes add up to 15, but the seconds add up to 76, which would add one more minute to the minutes (76 - 60 = 16) making 16 minutes and leaving 16 seconds.

There are Internet calculators that do this, but I haven''t found any way in Excel to do it, and I haven''t found anyone who has even asked this question.

推荐答案

我刚刚尝试了它:正如我期望的那样,它在Excel中可以运行,而无需任何计算器".
如果可以,只要使用"dd:dd"之类的字符串简单地增加时间即可.总和计算正确,但是如果您查看单元格类型,则不是"mm:ss"(分钟和秒),而是"hh:mm"(小时和分钟).有什么不同?如果您在60个小时之内停留不重要,则计算结果相同. :-)

不,不.当然,这是不正确的.做简单的事情:为每个单元格激活上下文菜单,并设置以下格式来计算持续时间计算中涉及的所有单元格:"Format Cell ..." => [标签]数字" =>类别:自定义" => 类型".在类型"行中输入所需的格式:"mm:ss","mm:ss.000","hh:mm:ss"或"hh:mm:ss.000".注意:您不必从可用类型列表中选择一种类型,只需编写所需的类型即可.对于汇总单元格,请使用功能SUM(range_from:range_to)或仅使用运算符"+".

您将获得正确的结果.秒或分钟将使用60毫秒(如果要使用的话,以毫秒为单位)的基数(以1000为单位),以更高的位数进行表示,这一切都可以预期.

—SA
I just tried it: as I expected, it works in Excel without any "calculators".
If works if you simply add time using strings like "dd:dd". The sum is calculated correctly, but if you look at the cell type, it''s not "mm:ss" (minutes and seconds), but "hh:mm" (hours and minutes). What''s the difference? not important if you stay within 60 hours, calculations look just the same. :-)

No, no. Of course this is not correct. Do simple thing: activate context menu for each cell and setup the following formats all cells involved in duration calculation: "Format Cell..." => [Tab] "Number" => Category: "Custom" => "Type". Type in the "Type" line desired format: "mm:ss", "mm:ss.000", "hh:mm:ss" or "hh:mm:ss.000". Note: you don''t have to select a type from the list of available types, just write the one you need. For the summary cell, use the function SUM(range_from:range_to) or just operator "+".

You will get correct results. Second or minutes will carried in higher-order digit using the base of 60, milliseconds (if you want to use them) — 1000, etc., all like you can expect.

—SA


这篇关于添加持续时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆