0
0
Excelspreadsheet~10 mins

Subtotals in Excel - Cell-by-Cell Formula Trace

Choose your learning style9 modes available
Sample Data

This data shows categories of items and their amounts. We want to calculate subtotals for each category.

CellValue
A1Category
B1Amount
A2Fruits
B210
A3Fruits
B315
A4Vegetables
B420
A5Vegetables
B525
A6Grains
B630
Formula Trace
=SUBTOTAL(9, B2:B6)
Step 1: SUBTOTAL(9, B2:B6)
Cell Reference Map
    A         B
1 Category  Amount
2 Fruits    10  
3 Fruits    15  
4 Vegetables 20  
5 Vegetables 25  
6 Grains    30  

Formula references cells B2 to B6 for amounts.
The formula uses the range B2:B6 which contains the amounts to sum.
Result
    A         B
1 Category  Amount
2 Fruits    10  
3 Fruits    15  
4 Vegetables 20  
5 Vegetables 25  
6 Grains    30  
7           100 

Cell B7 shows the subtotal sum of amounts 100.
The subtotal formula result 100 is shown in cell B7, summing all amounts in B2:B6.
Sheet Trace Quiz - 3 Questions
Test your understanding
What does the number 9 mean in the SUBTOTAL formula?
AIt tells SUBTOTAL to find average
BIt tells SUBTOTAL to sum the numbers
CIt tells SUBTOTAL to count numbers
DIt tells SUBTOTAL to find maximum
Key Result
SUBTOTAL(function_num, range) calculates a summary like SUM or AVERAGE on the range, ignoring hidden rows if any.