需要在Excel中分组时间插槽 [英] Need to group Time Slots in Excel

查看:472
本文介绍了需要在Excel中分组时间插槽的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在处理物流数据。从一天到一天,我定期进行预订。
现在这些预订是一致的,我有时间像

  04:45 
21:10
21:10
06:07
05:44
05:45
05:45
05:45

现在有多个预订我需要分组,如
04:00- 05:00 (1小时) - 这应该捕获在此期间所做的所有预订。
类似于白天的其他小时。
通过这样做,我将能够将单个值分组到特定组。你可以建议如何在excel中实现同样的价值。

解决方案

如果这些值作为日期存储在Excel中,已经具有Group Field选项的内置功能。你可以按小时分组,这可能是你想要的。请注意,您可以选择多个项以获取组的层次结构,如下所示。如果基础数据没有被格式化为日期,那么这将会中断。因此请注意。



如果您没有真正的日期,只有时间,则可以格式化为在Excel中的一个时间,它将工作。只是不要显示日期/日期,因为它会是乱码。




I am working on logistics data. I have booking being made throughout the day at regular intervals from start to the end of the day. Now these booking are consistent and I have time from like

04:45
21:10
21:10
06:07
05:44
05:45
05:45
05:45
etc. 

Now as there are multiple bookings I need to group them such as 04:00- 05:00 (1 hours)- this should capture all booking made during this period. Similar for other hours during the day. By doing this I will be able to group individual values into specific group. Can you please advice how to achieve the same in excel.

解决方案

If the values are stored as dates in Excel, the Pivot Table has this functionality built in already with the "Group Field" option. You can group by Hours which is probably what you want. Note that you can select multiple items to get a hierarchy of groups as shown below. This will break if the underlying data is not formatted as a Date so watch out for that.

If you do not have true dates and just have times, you can format as a Time in Excel and it will work. Just don't show the days/date because it will be gibberish.

这篇关于需要在Excel中分组时间插槽的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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