Excel COUNTIF Function

The COUNTIF function in Microsoft Excel counts cells in a range that meet a single criterion. It is useful for analyzing datasets to tally occurrences based on specific conditions, such as counting sales above a threshold or specific categories.

Key Topics

Overview of COUNTIF Function

The COUNTIF function evaluates a range against a user-defined criterion, counting cells that satisfy the condition. It supports numeric, text, or expression-based criteria, making it versatile for data analysis.

COUNTIF Function Syntax

The syntax for the COUNTIF function is as follows:

Syntax: =COUNTIF(range, criteria)

Parameters:

  • range: The range of cells to evaluate (required).
  • criteria: The condition to count, such as a number, text, or expression (required).

Implementation Examples

Below are examples of how to use the COUNTIF function in different scenarios.

Example 1: =COUNTIF(B2:B6, ">1000") — Counts cells in B2:B6 greater than 1000.

Example 2: =COUNTIF(A2:A6, "Laptop") — Counts cells in A2:A6 equal to "Laptop".

Example 3: =COUNTIF(C2:C6, "<>"") — Counts non-empty cells in C2:C6.

Sample Dataset (Excel-style View)

Below is a demo dataset styled like Excel, showing how the COUNTIF function can be used to count products meeting sales criteria.

A B C
1 Product Sales High Sales Count
2 Laptop 1500 =COUNTIF(B2:B6, ">1000")
3 Phone 800
4 Tablet 1200
5 Monitor 900
6 Printer 1100

Note: In the dataset, cell C2 uses =COUNTIF(B2:B6, ">1000") to count the number of products with sales greater than 1000 in B2:B6. The formula is displayed only in C2 for clarity, as it summarizes the range.

Key Takeaways

  • The COUNTIF function counts cells in a range that meet a single criterion.
  • Criteria can be numbers, text, or expressions, e.g., ">1000" or "Laptop".
  • It is useful for tallying occurrences based on specific conditions.
  • Common uses include counting sales above a threshold or specific categories.
  • The sample dataset demonstrates COUNTIF applied to count high sales products.