Excel Advanced - Getting the Most from Your Data
Getting the Most from Your Data
Make long worksheets easier to navigate by grouping detail, creating outline levels and calculating subtotals that reveal the right amount of information on demand.
Learning outcomes
Practice dataset
The embedded dataset contains quarterly operating figures for four Malaysian sales regions. It is intentionally arranged as an ordinary range because Excel's Subtotal command is unavailable while the data remains an Excel Table.
1. Understand outline levels
Inspect and sort the source
- Open Operating Data and click within A1:H25.
- Confirm there are no blank rows, merged cells or subtotal rows.
- Sort first by Region A–Z, then Department A–Z, then Month No. Smallest to Largest.
- Check the first group is Central → Marketing → January to March.
Create a manual row group
- Select the three Central Marketing detail rows.
- Choose Data → Group → Rows.
- Use the minus symbol beside the rows to collapse the group.
- Use the plus symbol to expand it again.
- Choose Data → Ungroup when finished.
Grouping hides rows; it does not delete or filter them. Formulas continue to reference grouped cells.
2. Create nested groups
Group departments inside a region
- Group the three Central Marketing rows.
- Group the three Central Operations rows separately.
- Select all six Central rows and group them again.
- Use the outline level buttons to move between the overall, regional and detailed views.
The exact number of displayed levels depends on whether Excel counts the ungrouped detail as an additional level.
Group worksheet columns
- Select columns G:H containing Budget and Actual.
- Choose Data → Group → Columns.
- Collapse the group to present only identifiers and Variance.
- Expand and ungroup the columns.
Column groups are useful when a report contains supporting calculations that readers do not need to see all the time.
3. Insert regional subtotals
Subtotal Actual by Region
- Remove all manual groups and confirm the data is sorted by Region.
- Click inside the range and choose Data → Subtotal.
- At each change in: Region.
- Use function: Sum.
- Add subtotal to: Budget, Actual and Variance.
- Keep Summary below data selected and click OK.
Checkpoint: Grand Total Actual is RM496,000. Central is RM134,300; Eastern RM116,500; Northern RM118,700; Southern RM126,500.
What formula does Excel insert?
=SUBTOTAL(9,G2:G7)Function number 9 means SUM. SUBTOTAL ignores other subtotal results, preventing double counting in the grand total.
Use summary levels
- Click outline level 1 to show the grand total only.
- Click level 2 to show regional subtotals.
- Click level 3 to restore every detail row.
- Use individual plus and minus symbols to open only one region.
This is the central benefit of outlining: one worksheet supports executive summary and operational detail without separate reports.
4. Add multiple subtotal calculations
Add average spending without replacing sums
- Open Data → Subtotal again.
- At each change in: Region.
- Use function: Average.
- Add subtotal to: Actual.
- Clear Replace current subtotals.
- Click OK and inspect the Sum and Average rows for every region.
Average Actual checkpoints: Central RM22,383.33; Eastern RM19,416.67; Northern RM19,783.33; Southern RM21,083.33.
5. Copy only the visible summary
Extract regional totals
- Return to a view that shows regional Sum rows but hides detail.
- Select the visible summary range.
- Choose Home → Find & Select → Go To Special → Visible cells only, or press Alt+;.
- Copy and paste into a new worksheet named Regional Summary.
- Use Paste Special → Values if the summary must remain independent.
Without “Visible cells only,” Excel may copy the hidden detail rows as well.
6. Remove subtotals safely
- Return to the detailed source sheet.
- Choose Data → Subtotal → Remove All.
- Confirm that 24 original detail rows remain and all inserted subtotal rows are gone.
- Clear any remaining manual groups through Data → Ungroup → Clear Outline.
Excel Table compatibility
If the Subtotal command is unavailable, the data may be stored as an Excel Table. Click within it, choose Table Design → Convert to Range, confirm Yes, then apply Data → Subtotal.
Microsoft 365 alternative for a dynamic summary
A PivotTable or formulas such as SUMIFS, UNIQUE and FILTER can create summaries that update more flexibly. The Subtotal command remains useful when you need subtotal rows embedded directly inside a sorted detail list.
Troubleshooting
Convert the Excel Table to a normal range before using the command.
Sort by the grouping field so identical values are adjacent.
Use the inserted SUBTOTAL formulas; do not replace them with SUM formulas that include subtotal rows.
Select Visible cells only with Go To Special or Alt+; before copying.
Knowledge check
1. Does grouping delete hidden rows?
No. Grouping changes only the display. The rows and their values remain in the worksheet.
2. Why must the data be sorted before applying Subtotal?
Excel inserts a subtotal whenever the chosen field changes. Sorting keeps each group together.
3. How do you retain Sum while adding Average?
Run Subtotal again with Average and clear “Replace current subtotals.”
4. What is the safest way to restore the source?
Use Data → Subtotal → Remove All, then clear any separate manual outline if necessary.
Completion checklist
- Source records: 24
- Grand Total Budget: RM506,000
- Grand Total Actual: RM496,000
- Grand Total Variance: RM10,000 favourable
- Regional Actual totals: RM134,300 / RM116,500 / RM118,700 / RM126,500
- Original rows after Remove All: 24
Next lesson: test assumptions and find target values with Data Tables, Goal Seek, Scenario Manager and Solver.