In this lesson we will learn about the process of grouping columns in Excel. Grouping in Excel means a set of rows or columns can be spanned by clicking the plus(+) symbol and collapsed by clicking the minus(-) symbol. A row or column group can consist of one or more than one row(s)/column(s).
For example if you have a list of subtasks under a main task then you can create a group consisting of all subtasks and you can span or collapse whenever needed to show or hide the detail under the main task.
Let’s understand this with a simple example. We have the below table containing different products and their category along with the rate, unit to be delivered and the total price for each product.
Now here we are thinking of keeping the columns A & C as main columns and we will make column B as the first column group and the columns D & E as the second column group.
To group columns first select the set of columns you want to group. Here we have selected column B for the first group and then Go to ‘Data’ in menu bar and select ‘Group’ option under ‘Group’. Do the same for columns D & E for the second group as well.
Now see below the two column groups have been created and the minus(-) symbols are available to collapse each group individually. As you can see there are two numbers available at the top left corner of the table. If you click on the number 1, all column groups will be collapsed. And if you click on the number 2, all column groups will be spanned.
See below how it looks after collapsing the groups. Only the main columns that are columns A & C are visible now as we didn’t include these columns within any group. The Plus(+) symbols are now appeared to span each column group.
To ungroup the columns you have to first span the columns belonging to that group and then Go to ‘Data’ in menu bar and select ‘Ungroup’ option under ‘Ungroup’ as follows.