COUNTIF function - Function that counts the number of cells in a data table that meet certain conditions in Excel
The following article introduces you to the COUNTIF function - one of the functions in the statistical function group is very popular in Excel.
Description: The function does a count of cells in a data table that meet certain conditions.
Syntax: COUNTIF (range, criteria)
Inside:
- range: Range you want to count, is a required parameter.
- criteria: The condition that identifies a cell or reference to be counted, which is a required parameter.
Attention:
- For conditional strings longer than 255 characters -> the function returns the wrong value.
- When the function refers to a closed cell or sheet -> the function returns the #VALUE! Error value
- For data that is text, enter a value without leading spaces.
For example:
Calculate the total number of items described in the table below:
1. Calculating the total number of items with unit price of 25000.
- In the cell to calculate, enter the formula : = COUNTIF (D6: D10, "= 25000")
- Press Enter -> item number with unit price of 25000 is:
2. Calculate the total number of items as apples.
- In the cell to calculate enter the formula: = COUNTIF (C6: C10, "= Apple *")
- Press Enter -> total number of apple items in the data table is:
3. Calculate the total number of fruit products except apples.
- In the cell to calculate, enter the formula: = COUNTIF (C6: C10, "<> Apple *")
- Press Enter -> total number of fruit items except apples is:
Above are instructions and some specific examples when using the COUNTIF function in Excel.
Good luck!
You should read it
- How to use COUNTIF function on Excel
- How to use Hlookup function on Excel
- The COUNTA function, how to use the function to count cells containing data in Excel
- How to compare data on 2 Excel columns
- COUNT function - Function that counts cells containing numbers in the list of arguments in Excel
- How to use the DAVERAGE function in Excel
- Instructions on how to use the Dmax function in Excel
- How to use DCOUNT function on Excel
May be interested
- COUNTIFS function - The function performs counting the number of cells in a data table that satisfy many conditions in Excelcountifs function: the function performs counting the number of cells in a data table that satisfy many conditions. syntax: countifs (criteria_range1, criteria1, [criteria_range2, criteria2], ...)
- DEVSQ function - The function returns the sum of squares of deviations of data points from the sample mean in Exceldevsq function: returns the sum of squares of deviations of data points from the sample mean. syntax: devsq (number1, [number2], ...)
- The EXPON.DIST function - The function returns the exponential distribution in Excelexpon.dist function: the function returns the exponential distribution, using this function to model the time of events. syntax: expon.dist (x, lambda, cumulative)
- F.DIST - The function returns the probability distribution F in Excelf.dist function: the function returns the probability distribution f. the function supports the version from excel 2010. syntax: f.dist (x, deg_freedom1, deg_freedom2, cumulative)
- F.DIST.RT function - The function returns the right probability distribution F for 2 data sets in Excelf.dist.rt function: the function returns the right probability distribution f for 2 data sets. support functions from the excel 2010 version. syntax: f.dist (x, deg_freedom1, deg_freedom2)
- F.INV function - The function returns the inverse of the probability distribution F in Excelf.inv function: the function returns the inverse of the probability distribution f. support function from the excel 2010 version. syntax: f.inv (probability, deg_freedom1, deg_freedom2)