Your manager asks, “What is the total sales for West region and how many pending orders do we have?” You could filter and calculate manually, but SUMIF and COUNTIF give the answer instantly and update automatically.
What does SUMIF do?
SUMIF adds numbers only when a condition is met. For example, it can add sales only for West region or only for Electronics category.
SUMIF structure
Example: =SUMIF(C:C,"West",I:I) adds Sales from column I only where Region in column C is West.
What does COUNTIF do?
COUNTIF counts cells that meet one condition. For example, it can count pending orders, closed orders, or records from a specific region.
Example: =COUNTIF(J:J,"Pending") counts how many rows have Pending status in column J.
Business examples
| Question | Formula | Use |
|---|---|---|
| Total sales for West? | =SUMIF(C:C,"West",I:I) | Regional sales |
| How many Pending orders? | =COUNTIF(J:J,"Pending") | Order tracking |
| Total Electronics sales? | =SUMIF(F:F,"Electronics",I:I) | Category report |
Use cell references as criteria
Instead of typing "West" inside the formula, you can use a cell reference like A4. This makes the formula reusable for multiple rows.
=SUMIF(C:C,"West",I:I)=SUMIF(C:C,A4,I:I)Create condition-based sales summaries
Download one ZIP file containing the practice workbook, challenge workbook, solution workbook, formula cheat sheet, quiz and answer key.
Mini assignment
- Create a region-wise sales summary using SUMIF.
- Create region-wise order count using COUNTIF.
- Create status-wise sales summary.
- Find total Electronics sales.
- Count Pending orders.
- Verify summary totals against overall sales.
Quick quiz
- What does SUMIF do?
- What does COUNTIF do?
- What are the three parts of SUMIF?
- Why is cell criteria useful?
Answers: Adds by condition; counts by condition; criteria range, criteria, sum range; makes formulas reusable.