How to create a table with subcategories in Excel

The dataset we have is a store bill that contains information about the vegetables and fruits purchased. We want to create a pivot table with a subcategory of fruits and vegetables. To do this, we will first create a pivot table and then select the cells from the pivot table to form a subcategory using the Group option in the context menu.

Creating a table with subcategories in Excel means that you are organizing your data into multiple levels or categories, with each category having its subcategories. By breaking down your data into smaller, more manageable chunks, you can quickly identify patterns and trends within the data that may not be apparent otherwise. 

Step 1 – Select the range of cells

Step 2 – Click on the Pivot table option

– After selecting the range of cells, click on the Pivot table option in the Tables groups of the Insert tab and a drop-down menu will appear

Step 3 – Click on the From table/range option

– From the drop-down menu, click on the From table/range option and a dialog box will appear 

Step 4 – Click on OK

– In the dialog box, click on the check box behind the New Sheet option
– Then click on OK and a pivot table will appear on a new sheet

Step 5 – Select the Cells

– Select the cells that you want to include in the first subcategory
– To select the non-adjacent cells, click on the first cell
– Then press the CTRL key and click on the other cells

Step 6 – Open the context menu

– After selecting the cells, right-click on any cell, and a context menu will appear

Step 7 – Click on the Group option

– From the drop-down menu, click on the Group option and the first sub-category will appear

Step 8 – Select the cell for the Second sub-category

– After forming the first subcategory, click on the cells that you want to include in the second subcategory

Step 9 – Open the context menu

– After selecting the cells, right-click on any cell, and a context menu will appear

Step 10 –  Click on the Group option

– From the drop-down menu, click on the Group option and the second sub-category will appear