How to Group Rows in Excel by Name (3 Methods)

Dataset Overview

To group rows by name in Excel, follow these three methods using a dataset that includes product, category, and amount information for different countries:


Method 1 – Using the Define Name Command from the Formulas Tab

Group Rows:

  • Select the range of cells from B5 to G7.

How to Group Rows in Excel by Name

  • Go to the Data tab in the ribbon.
  • From the Outline group, choose the Group drop-down.
  • Select Group from the options.

How to Group Rows in Excel by Name

  • A Group dialog box will appear; choose Rows and click OK.

  • The desired rows are now grouped.
  • You can expand or collapse the group using the plus (+) and minus (-) icons.

How to Group Rows in Excel by Name

Define a Name:

  • Again, select the range of cells from B5 to G7.

How to Group Rows in Excel by Name

  • Go to the Formulas tab in the ribbon.
  • From the Defined Names group, select Define Name.

How to Group Rows in Excel by Name

  • In the New Name dialog box, set your preferred name.
  • Click OK.

  • The group rows will now be named USA in the name box.

How to Group Rows in Excel by Name

Read More: How to Group Rows by Cell Value in Excel


Method 2 – Applying Name Manager to Group Rows by Name

Group Rows:

  • Select the range of cells from B9 to G11.

  • Go to the Data tab in the ribbon.
  • From the Outline group, choose the Group drop-down.
  • Select Group from the options.

How to Group Rows in Excel by Name

  • A Group dialog box will appear; choose Rows and click OK.

  • The desired rows are now grouped.
  • You can expand or collapse the group using the plus (+) and minus (-) icons.

How to Group Rows in Excel by Name

Define a Name Using Name Manager:

  • Again, select the range of cells from B9 to G11.

  • Go to the Formulas tab in the ribbon.
  • From the Defined Names group, select Name Manager.

How to Group Rows in Excel by Name

  • In the Name Manager dialog box, choose New.

  • In the New Name dialog box, set your preferred name.
  • Click OK.

  • The group rows will now be named Canada in the name box.

How to Group Rows in Excel by Name

Read More: How to Group and Ungroup Columns or Rows in Excel


Method 3 – Using the Name Box to Group Rows by Name

Group Rows:

  • Select the range of cells from B13 to G14.

  • Go to the Data tab in the ribbon.
  • From the Outline group, choose the Group drop-down.
  • Select Group from the options.

How to Group Rows in Excel by Name

  • A Group dialog box will appear; choose Rows and click OK.

  • The desired rows are now grouped.
  • You can expand or collapse the group using the plus (+) and minus (-) icons.

How to Group Rows in Excel by Name

Set a Custom Name Using the Name Box:

  • Again, select the range of cells from B13 to G14.

  • Look at the name box where cell B13 is displayed.

  • Change the name in the box to France according to your dataset.
  • Press Enter.

  • Now, if you select that group of rows, it will show France in the name box.

How to Group Rows in Excel by Name

Read More: How to Group Rows in Excel with Expand or Collapse


Download Practice Workbook

You can download the practice workbook from here:


Related Articles

<< Go Back to Group Cells in Excel | Outline in Excel | Learn Excel

Get FREE Advanced Excel Exercises with Solutions!
Durjoy Paul
Durjoy Paul

Durjoy Kumar, with a BSc in Naval Architecture & Engineering from Bangladesh University of Engineering and Technology, is a dedicated contributor to the ExcelDemy project. His substantial contributions include crafting numerous articles and demonstrating expertise in Excel and VBA. Durjoy adeptly automates Excel challenges using VBA macros, offering valuable solutions for user interface challenges. Apart from creating Excel tutorials, he is interested in Data Analysis with MS Excel, SPSS, C, C++, C#, JavaScript, Python Web Scraping, Data Entry... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo