0
0
Google Sheetsspreadsheet~10 mins

SUMIF and SUMIFS in Google Sheets - Cell-by-Cell Formula Trace

Choose your learning style9 modes available
Sample Data

Sales data for products with their categories and sales amounts.

CellValue
A1Product
B1Category
C1Sales
A2Apple
B2Fruit
C2100
A3Banana
B3Fruit
C3150
A4Carrot
B4Vegetable
C480
A5Broccoli
B5Vegetable
C5120
A6Orange
B6Fruit
C690
Formula Trace
=SUMIF(B2:B6, "Fruit", C2:C6)
Step 1: B2:B6
Step 2: Criteria "Fruit" applied to B2:B6
Step 3: C2:C6
Step 4: Sum values in C2:C6 where corresponding B2:B6 is "Fruit"
Step 5: =SUMIF(B2:B6, "Fruit", C2:C6)
Cell Reference Map
   A        B           C
1 Product  Category    Sales
2 Apple    Fruit       100
3 Banana   Fruit       150
4 Carrot   Vegetable   80
5 Broccoli Vegetable   120
6 Orange   Fruit       90

Formula references:
- B2:B6 (Category range)
- C2:C6 (Sales range)
The formula checks categories in B2:B6 and sums sales in C2:C6 where category is "Fruit".
Result
   A        B           C           D
1 Product  Category    Sales       Result
2 Apple    Fruit       100        
3 Banana   Fruit       150        
4 Carrot   Vegetable   80         
5 Broccoli Vegetable   120        
6 Orange   Fruit       90         
7                          =340
The formula result 340 is the sum of sales for all Fruit products.
Sheet Trace Quiz - 3 Questions
Test your understanding
What does the formula =SUMIF(B2:B6, "Fruit", C2:C6) do?
ACounts how many products are in the Fruit category.
BAdds sales amounts only for products in the Fruit category.
CAdds all sales amounts regardless of category.
DFinds the highest sale amount in the Fruit category.
Key Result
SUMIF sums values in a range where a condition on another range is true.