Bird
Raised Fist0
Excelspreadsheet~20 mins

COUNTIF and COUNTIFS in Excel - Practice Problems & Coding Challenges

Choose your learning style10 modes available
Challenge - 5 Problems
🎖️
COUNTIF and COUNTIFS Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
📊 Formula Result
intermediate
2:00remaining
COUNTIF with Text Criteria
Given a list of fruits in cells A1:A6: {"Apple", "Banana", "Apple", "Orange", "Banana", "Apple"}, what is the result of the formula =COUNTIF(A1:A6, "Apple")?
A3
B2
C1
D6
Attempts:
2 left
💡 Hint
COUNTIF counts how many cells match the given condition exactly.
📊 Formula Result
intermediate
2:00remaining
COUNTIFS with Multiple Conditions
In a table with columns A (Names) and B (Scores), cells A1:A5 contain {"John", "Anna", "John", "Mike", "Anna"} and B1:B5 contain {85, 90, 75, 90, 85}. What is the result of =COUNTIFS(A1:A5, "Anna", B1:B5, ">85")?
A2
B1
C0
D3
Attempts:
2 left
💡 Hint
COUNTIFS counts rows where all conditions are true at the same time.
❓ Function Choice
advanced
2:00remaining
Choosing the Right Function for Counting
You want to count how many cells in range C1:C10 contain numbers greater than 50 and text "Passed" in range D1:D10. Which formula correctly counts rows meeting both conditions?
A=COUNTIFS(C1:C10, ">50", D1:D10, "Passed")
B=COUNTIF(C1:C10, ">50") + COUNTIF(D1:D10, "Passed")
C=COUNTIF(C1:C10, ">50") * COUNTIF(D1:D10, "Passed")
D=COUNTIF(C1:C10:D10, ">50", "Passed")
Attempts:
2 left
💡 Hint
Use COUNTIFS to count rows where multiple conditions are true together.
🎯 Scenario
advanced
2:00remaining
Counting Dates Within a Range
You have dates in cells E1:E10. You want to count how many dates fall between January 1, 2024, and March 31, 2024, inclusive. Which formula gives the correct count?
A=COUNTIFS(E1:E10, ">=1/1/2024", E1:E10, "<=3/31/2024")
B)")13,3,4202(ETAD=<" ,01E:1E ,")1,1,4202(ETAD=>" ,01E:1E(SFITNUOC=
C=COUNTIFS(E1:E10, ">=DATE(2024,1,1)", E1:E10, "<=DATE(2024,3,31)")
D=COUNTIF(E1:E10, ">=1/1/2024") - COUNTIF(E1:E10, ">3/31/2024")
Attempts:
2 left
💡 Hint
Use DATE function inside quotes for correct date comparison in formulas.
❓ data_analysis
expert
3:00remaining
Analyzing COUNTIFS with Mixed Criteria
You have a sales table with columns: Product (A), Region (B), and Sales (C). You want to count how many sales records have Product "Widget", Region not equal to "East", and Sales greater than or equal to 100. Which formula returns the correct count?
A=COUNTIFS(A:A, "Widget", B:B, "<>East", C:C, ">100")
B=COUNTIFS(A:A, "Widget", B:B, "East", C:C, ">=100")
C=COUNTIFS(A:A, "Widget", B:B, "<>East", C:C, ">=1000")
D=COUNTIFS(A:A, "Widget", B:B, "<>East", C:C, ">=100")
Attempts:
2 left
💡 Hint
Use "<>" to specify not equal condition in COUNTIFS.

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