What is the difference between COUNT, COUNTA, COUNTIF, and COUNTIFS?

In Excel, COUNT, COUNTA, COUNTIF, and COUNTIFS are functions used to count cells based on different conditions. Here’s how they differ:

1. COUNT – Counts Only Numbers
  • Counts only numeric values in a range (ignores text, blanks, and errors).
  • Syntax:
    =COUNT(range)
    
  • Example:
    =COUNT(A1:A10)
    
    • If A1:A10 contains {10, "apple", 20, "", 30, "text", 40}, the result is 3 (only 10, 20, and 30 are counted).

2. COUNTA – Counts Non-Empty Cells
  • Counts all non-empty cells (includes numbers, text, dates, etc., but ignores blanks).
  • Syntax:
    =COUNTA(range)
    
  • Example:
    =COUNTA(A1:A10)
    
    • If A1:A10 contains {10, "apple", 20, "", 30, "text", 40}, the result is 5 (counts numbers and text, but ignores the blank cell).

3. COUNTIF – Counts Based on a Single Condition
  • Counts cells that meet a specific condition (can be text, numbers, or logical expressions).

  • Syntax:

    =COUNTIF(range, criteria)
    
  • Example:

    =COUNTIF(A1:A10, ">10")
    
    • If A1:A10 contains {5, 15, 20, 10, 30}, the result is 3 (15, 20, and 30 are greater than 10).
  • Example for text:

    =COUNTIF(A1:A10, "apple")
    
    • Counts how many times "apple" appears in A1:A10.

4. COUNTIFS – Counts Based on Multiple Conditions
  • Counts cells that meet multiple criteria in different ranges.
  • Syntax:
    =COUNTIFS(range1, criteria1, range2, criteria2, ...)
    
  • Example:
    =COUNTIFS(A1:A10, ">10", B1:B10, "Approved")
    
    • Counts how many numbers in A1:A10 are greater than 10 AND have "Approved" in B1:B10.

Key Differences at a Glance :
Function Counts What? Conditions?
COUNT Numbers only No conditions
COUNTA All non-empty cells (numbers & text) No conditions
COUNTIF Based on a single condition Yes
COUNTIFS Based on multiple conditions Yes