The Excel COUNTIF function counts the number of cells in a range that meet a given criteria. The syntax for the COUNTIF function is:
=COUNTIF(range, criteria)
where:
range is the range of cells to be counted
criteria is the criteria to be met by the cells in the range
For example, if you want to count the number of cells in the range A1:A10 that are greater than 10, you would use the following formula:
=COUNTIF(A1:A10, ">10")
The COUNTIF function can be used to count cells that meet a variety of criteria, including:
- Cells that are greater than, less than, or equal to a given value- Cells that are within a given range- Cells that are text values, numeric values, or dates- Cells that are blank, non-blank, or contain a specific value