Regarding the function COUNTIF , its official function is: Count the number of cells that meet a given condition in a certain area. The simple understanding is single condition counting. The grammatical structure is: =Countif (condition range, condition), both parameters cannot be omitted.
1. Countif-Count the number of specified values.
Purpose: counts the number of people based on "degree".
Method:
Enter the formula in the target cell: =COUNTIF(F3:F12,I3).
2. Countif-Count the number of values in the specified range.
Purpose 1: calculates the number of people whose monthly salary>the specified value.
Method:
Enter the formula in the target cell: =COUNTIF(G3:G12,">"&I3).
Purpose 2: counts the number of people in the specified interval.
Method:
Enter the formula in the target cell: =COUNTIF(G3:G12,">"&I3)-COUNTIF(G3:G12,">"&J3).
Interpretation:
As can be seen from the example, the calculation is the number of people whose "monthly salary" is greater than 2000 and less than or equal to 3000 or 4000. When calculating, just subtract the number of people> 3000 or> 4000 from the number of people> 2000.
Purpose 3: calculates the number of people whose "monthly salary" is greater than the average "monthly salary".
Method:
Enter the formula in the cell: =COUNTIF(G3:G12,">"&I3).
3. Countif-returns the number of cells containing text.
Purpose: counts the number of people who actually paid wages.
Method:
Enter the formula in the target cell: =COUNTIF(B3:B12,"*").
Interpretation:
"*" (asterisk) in Excel is a wildcard, which can match characters of any length.
4. Countif-count the number of cells with a specified length.
Purpose: counts the number of people whose "employee name" is 3 characters long.
Method:
Enter the formula in the target cell: =COUNTIF(B3:B12,"???").
Interpretation:
The "?" (question mark) in Excel is also the wildcard , which matches 1 character.
5. Countif-returns the number of cells containing the specified character (string).
Purpose 1: counts the number of people with a given surname (Yuan).
Method:
Enter the formula in the target cell: =COUNTIF(B3:B12,I3).
Interpretation:
The condition here is "Yuan*", "*" can represent characters of any length, so as long as all strings starting with "Yuan" are in the statistical range.
Purpose 2: counts the number of employees whose names contain "small".
Method:
Enter the formula in the target cell: =COUNTIF(B3:B12,I3).
Interpretation:
The condition here is "*小*",The characters before and after can be of any length.
6. Countif——Multi-condition counting
Purpose: Counts the number of people whose "education" is "undergraduate or junior college".
Method:
Enter the formula in the target cell: =SUM(COUNTIF(F3:F12,{"大本","大专"})).
Conclusion:
For more usages and techniques of the Countif function, welcome everyone to discuss and exchange in the message area! If there is something you don’t understand or don’t understand, you can also leave a message in the message area for consultation!
.