0
0
Google Sheetsspreadsheet~15 mins

Row and column grouping in Google Sheets - Real Business Scenario

Choose your learning style9 modes available
Scenario Mode
👤 Your Role: You are a sales analyst at a retail company.
📋 Request: Your manager wants a clear monthly sales report that can be expanded or collapsed by region and product category to save space and improve readability.
📊 Data: You have sales data for three regions (North, South, East) and three product categories (Electronics, Clothing, Home Goods) for the first quarter (January to March). Each row shows sales for a product category in a region for a month.
🎯 Deliverable: Create a grouped report in Google Sheets where rows are grouped by region and product category, and columns are grouped by months. This will allow the manager to expand or collapse details easily.
Progress0 / 5 steps
Sample Data
RegionCategoryMonthSales
NorthElectronicsJanuary1200
NorthElectronicsFebruary1100
NorthElectronicsMarch1300
NorthClothingJanuary900
NorthClothingFebruary950
NorthClothingMarch1000
SouthHome GoodsJanuary700
SouthHome GoodsFebruary750
SouthHome GoodsMarch800
EastElectronicsJanuary1500
EastClothingFebruary1200
EastHome GoodsMarch900
1
Step 1: Sort the data by Region, then by Category, then by Month to organize it for grouping.
Select all data rows, then use Data > Sort range: Sort by Region (A to Z), then Category (A to Z), then Month (January to March).
Expected Result
Data rows are ordered first by Region, then Category, then Month.
2
Step 2: Create a summary table with Regions as main rows and Categories as sub-rows, and Months as columns.
Set up a new table with Regions in column A, Categories in column B, and Months (January, February, March) as column headers in row 1 starting from column C.
Expected Result
A blank table structure ready for sales data with grouped rows and month columns.
3
Step 3: Fill the summary table with sales data using SUMIFS to sum sales by Region, Category, and Month.
In cell C2 (for example, North - Electronics - January), enter: =SUMIFS(D:D, A:A, $A2, B:B, $B2, C:C, C$1)
Expected Result
Sales numbers appear correctly for each Region, Category, and Month.
4
Step 4: Group the rows by Region and then by Category to allow collapsing and expanding.
Select the rows for each Region's Categories, then go to Data > Group rows. Repeat for each Region. Then group the Region rows if desired.
Expected Result
Rows can be collapsed or expanded by clicking the minus or plus signs next to the row numbers.
5
Step 5: Group the columns for the months to allow collapsing and expanding monthly data.
Select the columns for January, February, and March, then go to Data > Group columns.
Expected Result
Columns for months can be collapsed or expanded by clicking the minus or plus signs above the column letters.
Final Result
Region     | January | February | March
---------------------------------------
+ North    |         |          |      
  - Electronics | 1200    | 1100     | 1300 
  - Clothing   | 900     | 950      | 1000 
+ South    |         |          |      
  - Home Goods | 700     | 750      | 800  
+ East     |         |          |      
  - Electronics | 1500    | 0        | 0    
  - Clothing   | 0       | 1200     | 0    
  - Home Goods | 0       | 0        | 900  

(Plus/minus signs indicate grouped rows and columns that can be expanded or collapsed.)
Grouping rows by Region and Category helps focus on specific areas of sales.
Grouping columns by Month allows quick view of monthly sales trends.
The manager can collapse details to see only totals or expand to see detailed sales.
Bonus Challenge

Add a total sales column for each Region and Category that sums all months, and group this column with the months.

Show Hint
Use SUM across the month columns for each row, then include this total column in the column grouping.