Bird
Raised Fist0
Excelspreadsheet~15 mins

COUNTIF and COUNTIFS in Excel - Real Business Scenario

Choose your learning style10 modes available
Scenario Mode
👤 Your Role: You are a sales analyst at a retail company.
📋 Request: Your manager wants to understand how many sales transactions meet certain conditions, such as sales in a specific region or sales above a certain amount.
📊 Data: You have a sales data table with columns: Transaction ID, Region, Salesperson, Product, and Sales Amount.
🎯 Deliverable: Create formulas using COUNTIF and COUNTIFS to count transactions by region and by multiple conditions.
Progress0 / 5 steps
Sample Data
Transaction IDRegionSalespersonProductSales Amount
1001EastAliceWidget250
1002WestBobGadget150
1003EastCharlieWidget300
1004NorthAliceGizmo200
1005SouthBobWidget180
1006EastCharlieGadget220
1007WestAliceGizmo170
1008SouthCharlieWidget210
1009NorthBobGadget190
1010EastAliceGizmo230
1
Step 1: Count how many sales transactions happened in the East region using COUNTIF.
=COUNTIF(B2:B11, "East")
Expected Result
4
2
Step 2: Count how many sales transactions had a Sales Amount greater than 200 using COUNTIF.
=COUNTIF(E2:E11, ">200")
Expected Result
5
3
Step 3: Count how many sales transactions happened in the East region AND had a Sales Amount greater than 200 using COUNTIFS.
=COUNTIFS(B2:B11, "East", E2:E11, ">200")
Expected Result
4
4
Step 4: Count how many sales transactions were made by Alice in the West region using COUNTIFS.
=COUNTIFS(C2:C11, "Alice", B2:B11, "West")
Expected Result
1
5
Step 5: Count how many sales transactions were for the product 'Widget' with Sales Amount less than or equal to 210 using COUNTIFS.
=COUNTIFS(D2:D11, "Widget", E2:E11, "<=210")
Expected Result
2
Final Result
Sales Count Summary
-------------------
East Region Sales: 4
Sales > 200: 5
East Sales > 200: 4
Alice in West Region: 1
Widget Sales <= 210: 2
✓There are 4 sales transactions in the East region.
✓Five sales transactions have amounts greater than 200.
✓Four sales in the East region had sales amounts above 200.
✓Alice made 1 sale in the West region.
✓Two Widget sales had amounts less than or equal to 210.
Bonus Challenge

Create a formula to count how many sales transactions were made by Bob or Charlie in the South region with sales amounts between 150 and 220 inclusive.

Show Hint
Use COUNTIFS with multiple criteria and combine conditions with addition or use COUNTIFS twice and add results.

Practice

(1/5)
1. What does the Excel function COUNTIF(range, criteria) do?
easy
A. Counts the number of cells in a range that meet a single condition
B. Adds all numbers in a range that meet a condition
C. Counts cells with numbers only, ignoring text
D. Finds the maximum value in a range

Solution

  1. Step 1: Understand the function purpose

    The COUNTIF function is designed to count cells that match one specific condition.
  2. Step 2: Compare with other options

    B describes adding numbers meeting a condition (like SUMIF), C describes counting numbers only (like COUNT), and D describes finding the maximum (like MAX), none of which is COUNTIF.
  3. Final Answer:

    Counts the number of cells in a range that meet a single condition -> Option A
  4. Quick Check:

    COUNTIF counts matching cells [OK]
Hint: COUNTIF counts cells matching one condition only [OK]
Common Mistakes:
  • Confusing COUNTIF with SUMIF
  • Thinking COUNTIF counts multiple conditions
  • Assuming COUNTIF only counts numbers
2. Which of the following is the correct syntax for counting cells in range A1:A10 that equal 5 using COUNTIF?
easy
A. =COUNTIF(A1:A10, 5)
B. =COUNTIF(5, A1:A10)
C. =COUNTIF(A1:A10, ">=5")
D. =COUNTIF(A1:A10; 5)

Solution

  1. Step 1: Recall COUNTIF syntax

    The correct syntax is COUNTIF(range, criteria). The criteria can be a number without quotes.
  2. Step 2: Evaluate each option

    A uses ">=5" which counts cells greater than or equal to 5, not exactly 5; B reverses arguments, which is wrong; C uses 5 directly, which is correct and simpler; D uses semicolon which is locale-dependent and may cause error in some Excel versions.
  3. Final Answer:

    =COUNTIF(A1:A10, 5) -> Option A
  4. Quick Check:

    COUNTIF(range, criteria) with number criteria [OK]
Hint: Use =COUNTIF(range, number) without quotes for numbers [OK]
Common Mistakes:
  • Swapping range and criteria arguments
  • Using semicolon instead of comma in some locales
  • Using '>=5' instead of '5' for exact match
3. Given the data in cells A1:A5: {3, 5, 5, 7, 5}, what is the result of =COUNTIFS(A1:A5, ">=5", A1:A5, "<7")?
medium
A. 1
B. 2
C. 3
D. 4

Solution

  1. Step 1: Understand the COUNTIFS conditions

    COUNTIFS counts cells where values are >=5 AND <7.
  2. Step 2: Check each value in A1:A5

    Values: 3 (no), 5 (yes), 5 (yes), 7 (no, equals 7 but <7 fails), 5 (yes). So three 5s qualify, but 7 does not.
  3. Step 3: Confirm the count

    Three values are 5, but condition is >=5 and <7, so 5 counts. So count is 3.
  4. Final Answer:

    3 -> Option C
  5. Quick Check:

    Values between 5 and less than 7 = 3 [OK]
Hint: COUNTIFS counts cells meeting all conditions simultaneously [OK]
Common Mistakes:
  • Counting values equal to 7 incorrectly
  • Confusing COUNTIF with COUNTIFS
  • Misreading the logical AND in COUNTIFS
4. You want to count cells in B1:B10 that are greater than 10 and less than 20. Which formula has an error?
medium
A. =COUNTIFS(B1:B10, ">10", B1:B10, "<20")
B. =COUNTIF(B1:B10, ">10") + COUNTIF(B1:B10, "<20")
C. =COUNTIFS(B1:B10, "<20", B1:B10, ">10")
D. =COUNTIFS(B1:B10, ">10",B1:B10,"<20")

Solution

  1. Step 1: Understand the goal

    You want to count cells greater than 10 AND less than 20, meaning both conditions must be true simultaneously.
  2. Step 2: Analyze each formula

    A adds two COUNTIF results, which counts cells greater than 10 plus cells less than 20 separately, causing double counting. The other options use COUNTIFS correctly with both conditions combined.
  3. Final Answer:

    =COUNTIF(B1:B10, ">10") + COUNTIF(B1:B10, "<20") -> Option B
  4. Quick Check:

    Adding counts separately causes double counting [OK]
Hint: Use COUNTIFS for multiple conditions, not sum of COUNTIFs [OK]
Common Mistakes:
  • Adding COUNTIF results instead of using COUNTIFS
  • Misunderstanding AND vs OR logic
  • Using wrong operators in criteria
5. You have a sales table with columns: Region (A2:A10), Sales (B2:B10). Which formula counts sales greater than 1000 in the "East" region?
hard
A. =COUNTIF(A2:A10, "East") + COUNTIF(B2:B10, ">1000")
B. =COUNTIFS(A2:A10, ">1000", B2:B10, "East")
C. =COUNTIF(A2:A10, "East" & B2:B10, ">1000")
D. =COUNTIFS(A2:A10, "East", B2:B10, ">1000")

Solution

  1. Step 1: Identify conditions and ranges

    You want to count rows where Region is "East" AND Sales > 1000. Region is in A2:A10, Sales in B2:B10.
  2. Step 2: Match conditions to correct ranges

    =COUNTIFS(A2:A10, "East", B2:B10, ">1000") correctly uses COUNTIFS with Region range and criteria "East", and Sales range with ">1000". =COUNTIF(A2:A10, "East") + COUNTIF(B2:B10, ">1000") adds separate COUNTIFs, which is incorrect. =COUNTIF(A2:A10, "East" & B2:B10, ">1000") concatenates ranges incorrectly. =COUNTIFS(A2:A10, ">1000", B2:B10, "East") swaps criteria and ranges incorrectly.
  3. Final Answer:

    =COUNTIFS(A2:A10, "East", B2:B10, ">1000") -> Option D
  4. Quick Check:

    COUNTIFS matches multiple conditions on correct ranges [OK]
Hint: Use COUNTIFS with each condition and its range paired [OK]
Common Mistakes:
  • Adding separate COUNTIF results instead of COUNTIFS
  • Mixing up criteria and ranges
  • Concatenating ranges incorrectly
Recommended

Ready to prove it?

Pass the test and this pattern moves unknown strong while earning +1 Grip toward your certificate.

10 questions~5 mineasy hard