What Is COUNT in Excel and How to Use COUNT Function?

Excel is a widely used data management tool that helps us analyze and interpret data. It is underappreciated for the wide variety of tasks that can be performed on the application. Excel has a versatile library of built-functions, making it a very powerful tool. Hence making it a popular one too. 

In this article, we will be discussing the function COUNT in Excel.

As the name suggests, the ‘COUNT’ function helps us count cells in Excel. But that’s not it! There are five variations of COUNT in Excel, which helps us perform numerous counting tasks that we will be exploring in this article. You will get a sneak peek into the following topics:

  • What is COUNT in Excel?
  • What does the function COUNTA do in Excel?
  • How do you use COUNTBLANK?
  • How do you use COUNTIF?
  • How do you use COUNTIFS?

What is COUNT in Excel?

COUNT is generally a function used to count the number of cells in Excel. There are two different ways to use COUNT in Excel. The syntax is as follows:

COUNT(value1,[value2],…)  

The parameters of the COUNT function include comma-separated values. This function returns the total count of numeric values specified.

Usage:

countValues

Here we specify multiple values as the parameter and the COUNT function finds the total count of values in it.

NOTE: This function works only on numeric data. Hence, it will not find the count of text values if specified.

COUNT(range) 

This function is used to count the number of cells in a specified range. It can be used to quantify data.  

countRange_CountInExce

As we can see, using =COUNT(A2: A6), we get the count of cells in the range A2 to A6. This function works only on numeric data.

Now that we have understood how to use the function COUNT in Excel let’s look at the next function - COUNTA. 

Post Graduate Program in Business Analysis

In partnership with Purdue UniversityVIEW COURSE
Post Graduate Program in Business Analysis

What Does the Function COUNTA Do in Excel?

This function counts cells with data, i.e., non-empty values within a range. The syntax is as follows:

=COUNTA(value1,[value2],…)

The values can be any range too. For example A1:A10

Usage:

countA

As shown above, =COUNTA(E2: E6) counts cells with data(non-empty cells) in the range E2 to E6.

What Is the Difference Between COUNT and COUNTA in Excel?

COUNT calculates the count of cells with numeric values. In comparison, COUNTA finds the count of cells with non-empty data.

How Do You Use COUNTBLANK?

As the name implies, COUNTBLANK is a simple function that counts the number of blank or empty cells. The syntax is as follows:

=COUNTBLANK(range)

The COUNTBLANK function works on a specified range as a parameter.

Usage:

countBlank

Looking at the example shown, COUNTBLANK helps count cells that are left blank/empty. We can use this function to find the entries that are left blank.

How Do You Use COUNTIF?

The COUNTIF function counts cells that match specific criteria. The syntax is as follows:

 =COUNTIF(range,criteria) 

The two arguments here are:

  • Range- which can be specified as a range of cells in Excel. For example B1: B6
  • Criteria- a condition on the function. For example: “>50”, A1

This function works on the specified range, counting the cells that match the criteria or condition. 

Usage:

  • COUNTIF can be used to match the criterion with a string.

For example: 

countif_CountInExcel.

We are using the formula =COUNTIF(C2: C6, “Tianjin”) to check how many locations match the city “Tianjin”.

  • COUNTIF can be used to count cells with text-

Counting cells that only contain text is simple. We use ‘*’ as the condition.

The ‘*’ or asterisk symbol helps find any number of characters. In the following demo, you will see how the wildcard ‘*’ matches any number of characters.

countif_2

The function =COUNTIF(D2: E12,”*”) executes over the range D2 to E12 and counts cells that contain text.

If you want a partial match, you can use wildcard characters to count cells that contain a particular word or letters. Look at the example below:

countif_3

The formula =COUNTIF(C2: C12, “*HUBEI*”) counts the cells that have the value “HUBEI” in the range C2 to C12.

NOTE: Here, the asterisk symbol helps find cells with any sequence of leading or trailing characters. Also, this does not apply to boolean values.

  • COUNTIF can be used to count cells with the help of logical operators: Greater than, equal to or less than.

For example: 

/countif_4

=COUNTIF(E2:E6,">=60")

Here, we have used the COUNTIF function to find the number of people over the age of 60 affected by COVID. We have taken the range of ages from cells E2 to E6. The criteria being that the value must be greater than or equal to 60.

NOTE: The criteria MUST be specified within quotes.

Similarly, you can use the following logical operations.

Logical operation

Formula Example

Description

Less than “<”

=COUNTIF(C1:C10,”<20”)

Count if the values in cells are lesser than 20

Less than or equal to “<=”

=COUNTIF(C1:C10,”<=20”)

Count if the values in cells are lesser than or equal to 20

Greater than “>”

=COUNTIF(C1:C10,”>20”)

Count if the values in cells are greater than 20

Greater than or equal to “>=”

=COUNTIF(C1:C10,”>=20”)

Count if the values in cells are greater than or equal to 20

Equal to “=”

=COUNTIF(C1:C10,”=20”)

Count if the values in cells are equal to 20

Not equal to “!=”

=COUNTIF(C1:C10,”<>20”)

Count if the values in cells are not equal to 20

How Do You Use COUNTIFS?

This function is a plural counterpart of the COUNTIF function. It calculates the count of cells upon meeting multiple criteria.

The syntax is as follows:

  • =COUNTIFS(range1, criteria1,[range2, criteria2]…)

Here, range1 maps to the criteria1, range2 maps to criteria2, and so on.

The range1 and criteria1 are required arguments while the rest in square brackets are optional.

  • Range1 will be the range of cells to which the first condition (criteria1) will be applied.
  • Criteria1 defines the condition for the function that will work on Range1. The criteria can be any number, string, expression, or it can also be a cell reference. For example, “>=20”, ”China” or A1.
  • Similarly, [range2, criteria2] defines another set of range and its respective criteria to be met. They follow an ‘AND’ logic.

Multiple range-criteria sets can be added, and they must be comma-separated.

We will demonstrate the usage as follows.

countifs_CountInExcel.

The formula =COUNTIFS(B2:B12,">2/1/2020",D2:D12,"France") is used on two criteria. It checks if the reporting date is after 2/1/2020 AND if the country of the deceased individual is France.

NOTE: The COUNTIFS function follows AND logic. It counts cells only if both or ALL conditions are true. 

More About COUNTIF

There are various numbers of tasks that can be performed using COUNTIF and COUNTIFS.

  • If you have to find the number of times a value occurs in a range:

You can use =COUNTIF(A1: A10, A1). This will be demonstrated below.

countValueInRange

Using =COUNTIF(F2: F12, F2), we find the total count of cells where the cell containing “male” gender has been repeated.

  • Let’s say we want to find out if the data contains unique entries or not.

We can do so by using an IF with COUNTIF. Look at the following example.

countDuplicate.

The COUNTIF function executes first and finds the count of cells within the range A2 to A12, where the value in cell A3 (which is 2) has appeared. If the count is more than 1, duplicate values exist, and the result will be displayed as “DUPLICATE”. Else it displays “UNIQUE”. 

Gain expertise in the latest Business analytics tools and techniques with the Business Analyst Master's Program. Enroll now!

Conclusion

We hope this article has given you a strong understanding of how various functions are used to COUNT in Excel. The function may seem to perform simple calculations. But when you combine them with other Excel functions, you will be amazed by how powerful Excel is in getting meaning out of massive datasets.

Do you have any questions related to this article? If so, please mention it in the comments section and our experts will get back to you at the earliest. 

You can also go the extra mile and enhance your Excel skills by enrolling in the Business Analytics Certification Course with Excel offered by Simplilearn.

About the Author

SimplilearnSimplilearn

Simplilearn is one of the world’s leading providers of online training for Digital Marketing, Cloud Computing, Project Management, Data Science, IT, Software Development, and many other emerging technologies.

View More
  • Disclaimer
  • PMP, PMI, PMBOK, CAPM, PgMP, PfMP, ACP, PBA, RMP, SP, and OPM3 are registered marks of the Project Management Institute, Inc.