The COUNTIF function counts the number of cells that meet one criterion, such as the cells with a text string, the cells with a certain value, etc. The following formula is to help you get the count of cells equal to a particular value.
Example: You are working with a dataset with the first name in column A, the last name in column B, and the salary in column C.
Formula 1: To count how many people's salaries are equal to $70,256
= COUNTIF(C2:C8, "=70256")
The result returns three, and there are three people with a salary equal to $70,256.
Formula 2: To count how many persons' salaries are equal to $60,000
= COUNTIF(C2:C8, "=60000")
The result returns 0, and no one's salary equals $60,000.
Notes: The COUNTIF function
= COUNTIF(Range, "=number")
– The range is required, the range of cells you want to count;
– The number is required, which is the base number.