Go Back

Group times into 3 hour buckets

In Excel, we are able to group times into buckets using the FLOOR function.  The FLOOR function rounds a number down to the nearest multiple, as specified by the user.  This step by step tutorial will assist all levels of Excel users in grouping time into buckets.

Figure 1. Final result: Group times into 3-hour buckets

Final formula: =FLOOR(B3,"03:00")

Syntax of FLOOR Function

=FLOOR(number, significance)

The parameters are:

  • number – the value we want to round down to the nearest multiple
  • significance – any number that determines the multiple to which we want to round the number

Setting up Our Data

Our table consists of a list of times in column B.  In column C, we want to determine the 3-hour bucket that each data point belongs to.  

The time interval 12:01 AM to 02:59 AM belongs to the 12:00 AM bucket, 03:00 AM to 05:59 AM belongs to the 03:00 AM bucket, and so on.

Figure 2. Sample data to group times into 3-hour buckets

Group times into 3-hour buckets

To group the times into 3-hour buckets, we need to round down the times into multiples of 3.  

We need to follow these steps:

Step 1.  Select cell C3

Step 2.  Enter the formula: =FLOOR(B3,"03:00")

Step 3:  Press ENTER

Step 4:  Copy the formula to the succeeding cells by clicking and dragging down the “+” icon at the lower-right corner of cell C3

Figure 3. Using the FLOOR function to determine the 3-hour bucket group

Figure 4. Output: Group times into 3-hour buckets

Finally, the times are now grouped into 3-hour buckets: 12:00 AM, 3:00 AM, 6:00 AM, 9:00 AM, 12:00 PM and 3:00 PM.  

With the FLOOR function, we are able to group times into other time buckets such as 1 hour, 6 hours, or even 30 minutes.

Most of the time, the problem you will need to solve will be more complex than a simple application of a formula or function. If you want to save hours of research and frustration, try our live Excelchat service! Our Excel Experts are available 24/7 to answer any Excel question you may have. We guarantee a connection within 30 seconds and a customized solution within 20 minutes.

Did this post not answer your question? Get a solution from connecting with the expert.

Another blog reader asked this question today on Excelchat:
Here are some problems that our users have asked and received explanations on

I have three buckets of information - 1,2,3. The sum of 1,2, and 3 is 100%. The assumption is that a certain % from 1 move to 2 and a certain number from 2 move to 3. How do I build a formula such that the movements across the buckets still total 100%
Solved by F. F. in 28 mins
deleting non "on the hour" times
Solved by Z. Y. in 23 mins
I want to round military times to nearest quarter hour. "START" column
Solved by V. H. in 22 mins

Leave a Comment

avatar