How to Count in Excel with Examples

Photo of author

By Victor Ashiedu

Published

Excel COUNT Function is used for counting items in a worksheet. Excel COUNT also has the conditional function, COUNTIF. COUNTIF counts if a specific condition is TRUE.

This guide shows how to use Excel COUNT and COUNTIF functions.

Option 1: Count with the COUNT Function

In this section I will demonstrate how to count individual cells and a cell range.

To count cells B2,B3 and B4, use the formula below.

 =COUNT(B2,B3,B4)
How to Count in Excel Using Excel Count Function
When you type =COUNT( ) you can enter the cells one by one separated by commas. You could also press the Ctrl key and select each cell you wish to count.

To count the cell range B2 to B9, use the formula below:

=COUNT(B2:B9)
On the COUNT formula you can enter the cell range manually separated by a colon, (:). You could also press the Shift key and select the cells you wish to add to the range.

Option 2: Count with the COUNTA Function

The worksheet below (cells B2 to B6) shows a number and a number enclosed in quotation marks. The worksheet also has date, error and text values.

Excel Count Example 2 (COUNTA Function)

If you use the COUNT function to count B2 to B6:

=COUNT(B2:B5)

The result will be 2. The reason is because COUNT function cannot count numbers enclosed in quotation marks. Also, it cannot count texts or errors. However, you can use COUNT to count numbers and dates.

To count logical values, text, or error values, use the COUNTA function. The formula below will count all values in cells B2 to B6

=COUNTA(B2:B6)

The result is 5. All the entries have been counted!

Excel Count Example 2 (COUNTA Function)

Option 3: Count with the CountIF Function

CountIF Function counts cells that meet a specific condition.

Below is the Syntax

COUNTIF (range, criteria)

range – the cell range you want to count
criteria – the condition that must be met for a cell to be counted

Excel COUNTIF Example

Refer to the worksheet in the image above. To count only numbers greater than 3, use the formula:

=COUNTIF(B2:B6,">3")

The result is 2.

If you want to add multiple conditions, use COUNTIFS.

In the Excel Count example below, I will use COUNTIFS to count how many numbers (excluding 1 and 5) are contained in cells B2 to B6.

Here is the formula:

=COUNTIFS(B2:B6,">1",B2:B6,"<5")

And the result…

Conclusion

The COUNT Function comes in handy when you need to Excel to count a set of cells or a range. One thing to be in mind though: if you need to count logical values, text, or error values, use the COUNTA function.

I hope you found this Itechguide helpful. If you found the guide helpful, kindly share the part of the guide you found most helpful.

Leave your feedback by completing the “Leave a Reply” form found at the bottom of this page. Alternatively, you can respond to the “Was this page helpful?” question below.

About the Author

Photo of author

Victor Ashiedu

Victor is the founder of InfoPress Media, publishers of Ilifeguides and Itechguides. With 20+ years of experience in IT infrastructure, his expertise spans Windows, Linux, and DevOps. Explore his contributions on Itechguides.com for insightful how-to guides and product reviews.

Related Articles

Get in Touch

We're committed to writing accurate content that informs and educates. To learn more, read our Content Writing Policy, Content Review Policy, Anti-plagiarism Policy, and About Us.

However, if this content does not meet your expectations, kindly reach out to us through one of the following means:

  1. Respond to "Was this page helpful?" above
  2. Leave a comment with the "Leave a Comment" form below
  3. Email us at [email protected] or via the Contact Us page.

Leave a comment

Send this to a friend