How to Create a Table with Subcategories in Excel – 2 Methods

Method 1 – Using a Pivot Table to Create a Table with Subcategories in Excel

Create a Pivot Table.

Steps:

  • Select a cell in the dataset.
  • Go to the Insert tab.
  • Click Pivot Table.
  • Select From Table/Range.

inserting pivot table to show how to create a table with subcategories in excel

  • Enter the cell range in Table/Range.
  • Select New Worksheet oval.
  • Click OK.

  • In Pivot Table Fields, drag Countries to Rows.

dragging fields into rows to show how to create a table with subcategories in excel

  • Drag World Cup Titles to Values.

  • Select data and right-click.
  • Select Group.

grouping data to show how to create a table with subcategories in excel

  • The datasets will be grouped as a subcategory.
  • Follow the same for the rest of the data.

  • Rename the row labels.

renaming row labels to show how to create a table with subcategories in excel

  • Rename the group names.

renaming groups to show how to create a table with subcategories in excel

  • The table displays categories and subcategories.

  • You can collapse the subcategories by clicking the minus sign.

collapsing subcategories to show how to create a table with subcategories in excel

Read More: How to Make a Table in Excel with Lines


Method 2 – Applying Data Validation

Steps:

  • Select  B5:B7.
  • Go to the Data tab.
  • Select Data Tools and choose Data Validation.

applying data validation command to show how to create a table with subcategories in excel

  • In Allow, select List.
  • Choose E4:G4 as Source.
  • Click OK.

inserting list and source to show how to create a table with subcategories in excel

  • Select C5.
  • Go to the Data tab.
  • In Data Tools, choose Data Validation.

  • Choose List in Allow.
  • Enter the following formula in Source.
=OFFSET($E$4,1,MATCH($B5,$E$4:$G$4,0)-1,COUNTA(OFFSET($E$4,1,MATCH($B5,$E$4:$G$4,0)-1,4,1)))
  • Click OK.

using formula to show how to create a table with subcategories in excel

  • Subcategories will be displayed in C5, in a drop-down list.

  • Select C5 and press Ctrl + C.
  • Select C6 and C7 and right-click.
  • Choose Paste Special.

applying paste special to show how to create a table with subcategories in excel

  • Choose Validation in Paste.
  • Click OK.

  • C6 and C7 also display subcategories.

Read More: Create Table in Excel Using Shortcut


How to Create a Multi-Category Chart in Excel

Steps:

  • A graph is displayed with multiple categories.

Read More: How to Add New Row Automatically in an Excel Table


Download Practice Workbook

Download the practice workbook here.


Related Articles


<< Go Back to Excel Table | Learn Excel

Get FREE Advanced Excel Exercises with Solutions!
Adnan Masruf
Adnan Masruf

Adnan Masruf, holding a BSc in Naval Architecture & Engineering from Bangladesh University of Engineering and Technology, plays a pivotal role as an Excel & VBA Content Developer at ExcelDemy. His deep passion for research and innovation seamlessly aligns with his dedication to Excel. In this capacity, Masruf not only skillfully addresses challenging issues but also exhibits enthusiasm and expertise in gracefully navigating intricate situations, underscoring his steadfast commitment to consistently delivering exceptional content. His interests... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo