Welcome back. In this small video session, we'll talk about how to group and ungroup columns and rows. Now what do I mean by that? Let's see for ourselves. Imagine if you have a data, which is broken down into quarterly break up. So for example, 2010, total sales has been broken down into four quarterly sales numbers.
And at times, you would not want to show these details to the user. So you'd want to place a button which quickly hides and unhide these columns. This is significantly better than simply hiding the column. Why? Because in that case, the user the end user has to selectively choose the adjoining columns which are visible, and then right click and say unhide. So rather than taking him through these hardships, why not just apply this grouping?
Let's see how. First, I will choose the four columns which I want to hide and make it a part of the group numbers. I go to Data tab within which, on the right hand side, let me go to the group button and simply click on group. Instantly, it puts a button on top right, and it has the minus sign, which if I click upon, it simply hides it. If you want to bring it back to the original scenario, remember to first unhide the data, choose the same four columns, and then go to ungroup. Now at times, if you selectively choose certain cells and not columns, then there's a slight difference in strategy.
For example, in this case, I have chosen the four columns cells, not the entire columns. I then go to Data tab, I go to group and I click on the group button. Now, since I did not choose the entire set of columns, Excel is confused. It asks me for clarification, whether do I want to group the rows or columns at this moment, let me choose columns. I press OK. same effect as we had seen few moments back, naked had the same effect for rules as well. So if you have a particular region under which several cities are mentioned, you want to group them row wise.
So I choose the two rules. These are the city's names. I then go to data, and I then go to group option. So if you happen to use this frequently, I would definitely want to share two tricks, two shortcut tricks with you, which is how do you select the entire column and how to select the entire row, I select a particular cell, I press Shift spacebar. If I continue to press Shift Down, down, down, down, it selects the entire rules thereafter. Else, if you press Ctrl spacebar, it chooses the entire column.
And then you can use shift Right, right, right and left to be able to choose the adjoining columns. And then of course, you can go ahead to data and click on group. So this was all about group and ungrouping of columns and rows.