How to use the count function containing the condition COUNTIF
- 24-07-2022
- trienkhaiweb
- 0 Comments
When working with Excel, you cannot avoid using the COUNTIF function. Because this is the function that contains the condition that is used a lot. However, so far, many of you are still quite confused with this function. So, to help you better understand how to use this function, today Web888 will show you how to use the COUNTIF function.
Until now, Excel is one of the most used tools in the working process. Therefore, it is imperative that you master the functions when working. If we calculate the sum using the SUM function or the SUMIF function , calculate the average using the AVERAGE function , then with the counting function you need to use the COUNT function, especially with the conditional counting functions, you must use the COUNTIF function .
The article consists of 2 parts:
- Introduction to the COUNTIF . function
- Illustrated example of the COUNTIF . function
Mục lục
1. Introduction to the COUNTIF . function
The COUNTIF function is a function used to count the number of cells that satisfy a condition (Criteria) in a range (Range).
The COUNTIF function is often used in fields such as statistics and calculations. And it works on all versions of Excel.
The function syntax is as follows:
=COUNTIF(range,criteria)
In there:
- Range: The range of conditions that we want to count or want statistics.
- Criteria: Conditions for you to get results.
For example, we have the following data table:
Requires you to count the number of people with employee titles.
We have the formula: =COUNTIF(C2:C6, "employee") , the result is 3
2. Example COUNTIF . function
We have the following data table:
Request:
- Count the number of male students in the worksheet?
- Count the number of 9s that the students got in all subjects?
- Count how many points are lower than point 4 in the data sheet?
To answer the above questions, do the following:
First, count the number of male students in the worksheet.
First, you need to be able to determine:
- The area we want to count is the gender column C2:C11.
- The condition here is that the student is male.
From there we have the following formula:
=COUNTIF(C2:C11,"Nam") the result we get is : 6
Second, count the number of 9s that the students got.
Same as above, you need to specify:
- The area we want to count is the total score of 4 subjects D2:G11.
- Condition: point 9
From there we have the following formula:
=COUNTIF(D2:G11, 9) the result we get is: 11
Finally, count the number of points lower than 4.
Do the same thing, but instead of the condition being 9, you instead "<4" . So we have the following formula:
=COUNTIF(D2:G11, “<4”) the result we get is 3.
So, above I showed you how to use the COUNTIF function. This is one of the most used counting functions, especially in the accounting field. If you are not sure about any problem, you can comment below to get help. In addition, you should also refer to the COUNTIF function – the counting function contains many conditions . This is also a function that helps you work much more efficiently.
If you find the article useful, you can Like and share the article to make it known to more people. Thank you!