Microsoft Excel COUNT Function counts the number of cells that contain numbers within a list of arguments. The syntax of the COUNT Function is = COUNT(value1, [value2], [value3], etc.) where value1 is required while others are optional. The maximum number of optional values reaches up to 255 items in an Excel COUNT Function. Note that each item contains either a cell reference or a range of cells where you want to count numbers.
For example, COUNT(B2:B9) will count all cells that contains numbers.
In addition to Count Function, there are a list of similar statistical functions like COUNTA, COUNTBLANK, COUNTIF, and COUNTIFS. However, we will go through each of these functions with examples.
Microsoft Excel COUNTA Function
The COUNTA function counts the number of cells that are not empty in a range. So, it counts logical values, texts, or even errors. The Syntax of COUNTA Function is COUNTA(value1, [value2], …) where value1 is required while others are optional.
For example, COUNTA(C2:C9) in the above screenshot will count cells that contains any kind of information except for empty cells in a range.
Microsoft Excel COUNTBLANK Function
The COUNTBLANK Function is simply counts the blank cells in a range of cells. The syntax of COUNTBLANK Function is COUNTBLANK(range) where range is required and represents the range of cells which you want to count the blank cells.
For example, COUNTBLANK(D2:D9) in the above screenshot will counts empty cells. The result is 2 since there are two empty cells.
MS Excel COUNTIF Function
The COUNTIF Function counts the number of cells that meet a specific criterion. The syntax of COUNTIF is COUNTIF(range, criteria) where both items are required. The criteria must contain an expression such as “>3”, “<>” & A5, or “Apple”.
Examples:
- =COUNTIF(A2:A7,”>3″) will count the number of cells with a value greater than 3 in cells A2 through A7.
- =COUNTIF(A2:A7, “<>3”) will count the number of cells with a value that is not equal to 3 in cells A2 through A7.
- =COUNTIF(A2:A7, “Apple”) will count the number of cells with “Apple” in cells A2 through A7
MS Excel COUNTIFS Function
The COUNTIFS Function is like COUNTIF Function, but it applies criteria to cells across multiple ranges and counts the number of times all criteria are met.
Syntax: COUNTIFS(criteria_range1, criteria1, [criteria_range2, criteria2]…).
- criteria_range1 is required and it represents the first range in which to evaluate the associated criteria.
- criteria1 is required. It can be a number, expression, cell reference, or a text that define which cells will be counted.
- criteria_range2, criteria2, etc. are optional.
For example, =COUNTIFS(B2:B8,“>3”,A2:A8,“Apple”) will count the number of cells with a value of greater than 3 in range B2 through B8 and has a value “Apple” in range A2 through A8 as shown at the screenshot below.
For more details. See Excel Count Function. If you are interested in Microsoft Access, see MS Access DCOUNT Function.