简体   繁体   English

在Excel中将小数转换为小时

[英]Convert Decimal to Hours in Excel

I'm using excel to sum up all the hours that my team worked on. 我使用excel来总结团队工作的所有时间。 However, the hours are displayed as 31.60 or 31.70 但是,小时数显示为31.60或31.70

I want to convert 31.60 = 32 or 31.70 = 32.10. 我想转换31.60 = 32或31.70 = 32.10。 Just need the numbers, no formatting text. 只需要数字,无需格​​式化文本。

You could take the decimal part like A1-INT(A1) where A1 is your data and divide it by 0.6. 您可以使用小数部分,例如A1-INT(A1) ,其中A1是您的数据,然后将其除以0.6。 The integer result that you get is added to the integer part of your cell. 您获得的整数结果将添加到单元格的整数部分。 And finally add the rest of the division. 最后添加其余部分。 I didn't manage to keep it short. 我没有设法使它简短。

=INT(A1)+ INT((A1-INT(A1))/0.6)+ MOD((A1-INT(A1)),0.6)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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