Using count, Counta, Countblank, Count if functions | Excel Tutorial - Learn with VOKS
Back Next

Using count, Counta, Countblank, Count if functions


COUNT functions help you:

count how many cells meet a specific condition.

They are commonly used for:

  • attendance sheets
  • sales reports
  • student scores
  • surveys
  • dashboards

Why They Matter

Instead of counting manually, Excel does it automatically.

Example:

  • How many students took the test?
  • How many sales are above ₦5,000?
  • How many cells are empty?

COUNT Function

What It Does

Counts cells that contain numbers only.

Syntax

=COUNT(value1, value2, ...)

Example

Data in A1:A5:

10
20
Excel
40

Formula:

=COUNT(A1:A5)

Result:

3

Because only 3 cells contain numbers.

COUNT Summary

| Feature            | COUNT                     |
|--------------------|---------------------------|
| Counts numbers     | ✅ Yes                    |
| Counts text        | ❌ No                     |
| Counts blank cells | ❌ No                     |

COUNTA Function

What It Does

Counts all non-empty cells.

  • numbers
  • text
  • TRUE/FALSE
  • errors

Syntax

=COUNTA(A1:A5)

Example

10
Apple
40

Result:

3

COUNTA Summary

| Feature            | COUNTA                    |
|--------------------|---------------------------|
| Counts numbers     | ✅ Yes                    |
| Counts text        | ✅ Yes                    |
| Counts blank cells | ❌ No                     |

COUNTBLANK Function

What It Does

Counts empty cells only.

Syntax

=COUNTBLANK(A1:A5)

Example

10

Apple

Result:

2

COUNTBLANK Summary

| Feature            | COUNTBLANK               |
|--------------------|---------------------------|
| Counts numbers     | ❌ No                     |
| Counts text        | ❌ No                     |
| Counts blank cells | ✅ Yes                    |

COUNTIF Function (Most Powerful & Most Used)

What It Does

Counts cells that meet a specific condition.

Syntax

=COUNTIF(range, criteria)

Example 1: Count Students Who Passed

=COUNTIF(A1:A10, "Pass")

Example 2: Count Values Greater Than 50

=COUNTIF(A1:A10, ">50")

Example 3: Count a Specific Name

=COUNTIF(A1:A10, "John")

COUNTIF Operators

| Operator | Meaning              | Example        |
|----------|----------------------|---------------|
| =        | Equal to             | "=50"         |
| >        | Greater than         | ">50"         |
| <        | Less than            | "<50"         |
| >=       | Greater or equal     | ">=50"        |
| <=       | Less or equal        | "<=50"        |
| <>       | Not equal            | "<>Fail"      |

Examples

Attendance Sheet

Present
Absent
Present
Present

Count present students:

=COUNTIF(A1:A4,"Present")

Sales Report

Count sales above ₦5,000:

=COUNTIF(B1:B10,">5000")

Student Result

Count how many passed:

=COUNTIF(C1:C20,"Pass")

COUNT vs COUNTA vs COUNTBLANK vs COUNTIF

| Function   | Counts Numbers | Counts Text | Counts Blank | Uses Condition |
|------------|---------------|------------|-------------|---------------|
| COUNT      | ✅            | ❌         | ❌          | ❌            |
| COUNTA     | ✅            | ✅         | ❌          | ❌            |
| COUNTBLANK | ❌            | ❌         | ✅          | ❌            |
| COUNTIF    | ✅            | ✅         | ❌          | ✅            |

⚠️ Common Beginner Mistakes

❌ Using COUNT for text

=COUNT(A1:A10)

This will NOT count names.

Use:

=COUNTA(A1:A10)

Forgetting quotes in COUNTIF

Wrong:

=COUNTIF(A1:A10,Pass)

Correct:

=COUNTIF(A1:A10,"Pass")

Summary

COUNT

Counts numbers only.

COUNTA

Counts all filled cells.

COUNTBLANK

Counts empty cells.

COUNTIF

Counts cells based on a condition.

Excel
Introduction Setting Up Your Environment Navigating the Worksheet Environment Data Trimming, Sorting and Filtering Tables, Nesting Functions Understanding and Classifying Data Types, Changing to Text and Rounding Values Cleaning the data, Joining text strings, Capitalizing words, Using upper and lower case, Extracting text from cells, Counting characters, Extracting text, Replacing characters Preparing date data, Finding days of the week, Finding the matching column Using Vlookup, Hlookup, Index, Pivot tables and case studies Using count, Counta, Countblank, Count if functions Math Functions in Excel Using Minimum, Maximum, Averages to aggregate data Logical Functions Conditional Aggregation Using the IF Function Getting Familiar with Different Visuals Available in Excel and When to Use Them Analyzing Data with Line and Area Charts Analyzing Data with Stacked Area Chart and 100% Stacked Chart Building a Dashboard in Excel
All Courses
Advance AI Bootstrap C C++ Computer Vision Content Writing CSS Cyber Security Data Analysis Deep Learning Email Marketing Excel Figma HTML Java Script Machine Learning MySQLi Node JS PHP Power Bi Python Python for AI Python for Analysis React React Native SEO SMM SQL