Table of Contents
Grouping data by hour in Excel allows for easier organization and analysis of time-based data. This feature allows users to quickly group data by the hour, making it easier to spot patterns and trends. To group data by hour in Excel, select the data and go to the “Data” tab, then click on “Group” and select Hours” from the options. This will automatically group the data by hour, creating a neat and organized structure for further analysis. This feature is especially useful for tracking and analyzing data over a period of time, such as sales data or project timelines.
Group Data by Hour in Excel
Often you may want to group data by hour in Excel.
Fortunately this is easy to do using the Group function within a pivot table.
The following step-by-step example shows how to use this function to group data by hour in Excel.
Step 1: Create the Data
First, let’s create a dataset that shows the total sales made by some company during various times:

Step 2: Create a Pivot Table
Next, highlight the cells in the range A1:B12 and then click the Insert tab along the top ribbon and click Pivot table.
In the new window that appears, we’ll choose to insert the pivot table into cell D1 of the existing worksheet:

In the window that appears on the right side of the screen, drag the Time variable to the Rows group and the Sales variable to the Values group:

The following pivot table will appear:

Step 3: Group the Data by Hour
To group the data by month, right click on any value in the Row Labels column of the pivot table and click Group:


Once you click OK, the data in the pivot table will automatically be grouped by hour:

The pivot table now shows the sum of the sales grouped by hour.
Note: If you need to group data by days and hours in the pivot table, you can simply highlight both Days and Hours in the Grouping window.
The following tutorials explain how to perform other common operations in Excel:
Cite this article
stats writer (2024). How can I group data by hour in Excel?. PSYCHOLOGICAL SCALES. Retrieved from https://scales.arabpsychology.com/stats/how-can-i-group-data-by-hour-in-excel/
stats writer. "How can I group data by hour in Excel?." PSYCHOLOGICAL SCALES, 23 Jun. 2024, https://scales.arabpsychology.com/stats/how-can-i-group-data-by-hour-in-excel/.
stats writer. "How can I group data by hour in Excel?." PSYCHOLOGICAL SCALES, 2024. https://scales.arabpsychology.com/stats/how-can-i-group-data-by-hour-in-excel/.
stats writer (2024) 'How can I group data by hour in Excel?', PSYCHOLOGICAL SCALES. Available at: https://scales.arabpsychology.com/stats/how-can-i-group-data-by-hour-in-excel/.
[1] stats writer, "How can I group data by hour in Excel?," PSYCHOLOGICAL SCALES, vol. X, no. Y, ص Z-Z, June, 2024.
stats writer. How can I group data by hour in Excel?. PSYCHOLOGICAL SCALES. 2024;vol(issue):pages.
