COUNT vs COUNTIF Function Excel

What is the COUNT Function?

The COUNT function is used in Excel to count the number of cells containing numerical data. If a range of 12 cells are selected, and 10 have numerical data in, then the COUNT function will return an answer of 10. The values that can be supplied to the count function include hard-coded numbers, cell references, or ranges.

The COUNT function in Excel is a powerful tool for counting the number of cells containing numerical values. It is essential for various tasks, such as tracking transactions, analyzing data, and managing information efficiently.

How to use the COUNT Function

Cells that are not counted include in the COUNT function those with text, zeros, errors, true or false values, or empty cells. The uses of the count function include counting non-blank cells, counting the number of years, staff, or sales.

It can be helpful to have a count function on a data feed if you want to ensure that all the cells (e.g. 320 cells) are all populated with data when the feed is updated.

This is how to use the COUNT function to count how many excel cells are populated with numerical data:

  1. Start by typing the formula: begin by typing “=COUNT(“ in the cell where you want the result to appear
  2. Include cell references: after typing “=COUNT(“ you need to include the cell references or ranges that you want to count – for example, “=COUNT(C5:C15)” will count the number of transactions in column C
  3. Once you have included the cell references, close the brackets and press Enter
  4. The count function will then display the number of cells containing numbers

COUNT Function Formula

The count formula in Excel is as shown:

Examples of the COUNT Function in Excel

In this example, we want to work out how many transactions were made from the data provided. This information is listed in column B. Using the COUNT function we can request that Excel counts the number of cells within the range which contain a figure.

In this example we would type in “=COUNT(B9:B20) as it captures the cells containing transaction details.

The answer is 12 and is shown in cell E5

If we were to use the COUNT function to count the column F range (F9:F20) rather than column B (B9:B20) to see how many cells were populated. The answer would be 11, as cell F20 has an error message  in so would not be counted. Only cells with numerical data in would be counted with the COUNT function.

What is the COUNTIF Function?

The COUNTIF function is very similar as it counts the number of cells within a range, but this count will have to meet a specific condition (IF function). For example, we may want to count the number of transactions done by a specific person. Or we may want to count to sales of a specific product using the data download provided.

COUNTIF is very useful as it can manipulate data by selecting parts of it to be used. Mastering this function is invaluable as it can enable rapid and accurate analysis of data.

COUNTIF Function Formula

The COUNFIF function formula is written as below and includes the COUNT range, and the IF criteria required to be met.

Examples of the COUNTIF Function in Excel

Using the same data sample, let’s work out how many transactions Betsy has made using the COUNTIF function to do this.

We can select a range and the COUNTIF function will then sum up the total number of cells that are linked to ‘Betsy’ and the range now covers column C where the names are provided. Essentially it is using the COUNT function to add up the number of times “Betsy” is mentioned.

The answer is 3, meaning that out of the chosen range, 3 cells have the word ‘Betsy’ in them.

Note in this example the range runs until the bottom of the Excel spreadsheet (row 1891), but this doesn’t matter as the COUNT function will only count cells populated with numerical data. This is a useful practice when dealing with data downloads which may vary in terms of size (and therefore number of rows used).

Conclusion

The COUNT and COUNTIF functions in Excel are powerful tools for counting the number of cells containing numerical values. It can be essential for various tasks, such as tracking transactions, analyzing data, and managing information efficiently.

By understanding how to use the COUNT function and its variations, such as COUNTIF, users can enhance their data analysis capabilities and streamline their workflow. Whether you are working with large datasets or simple lists, mastering the COUNT function will undoubtedly improve your proficiency in Excel.

Download the free Financial Edge template with a COUNT and COUNTIF function set up in Excel from the free downloads section

Additional Resources

30 Key Excel Functions for Finance

Match Function

Sum Function