# How to use the Excel COUNT function

Anyone who works with large tables often knows that if you try to count specific cells manually, it’s almost impossible to avoid errors. But it doesn’t have to be that way. If you want to know how many cells contain numbers, Excel has a simple function that can help you. In Excel, COUNT immediately tells you how many cells in the selected range contain numbers. We’ll explain how it works.

## What do you need Excel’s COUNT function for?

When working with Excel on a daily basis, sometimes you need to know how many cells in a table contain numbers. For example, if you’re working with revenue results, you may need to check the number of entries. The function can also be used to calculate the sum of numbers from a wide variety of values. Excel’s COUNT function only counts **numbers, dates, and numbers turned into text with quotation marks**.

---

### Note

The Excel COUNT function only counts the number of cells, it does not total the values in the cells. There is another function in Excel that does that: [SUMIF](https://www.ionos.co.uk/digitalguide/online-marketing/online-sales/sumif-in-excel/ "SUMIF in Excel") allows you to filter cell values by certain criteria (e.g. text criteria or special symbols like $) and then add them up.

---

## COUNT: syntax

All you have to enter for the COUNT function is the range to analyse. Entries are made in the form of cell references. Select a **from-to range** separated by a colon as the function input.

```none
=COUNT(Value1;[Value2];…)
```

The advantage of this function is that you can specify multiple ranges. If the cells you want Excel to check are not contiguous, you can simply specify multiple ranges and don’t need to restructure your entire table. You can integrate **up to 255 additional ranges** of different sizes into the COUNT function.

## Using Excel: Examples of the COUNT function

The COUNT function checks a range for entries that Excel treats as numbers:

```none
=COUNT(B2:E2)
```

[![Image: COUNT function for a single row](https://www.ionos.co.uk/digitalguide/fileadmin/_processed_/2/d/csm_count-function-excel-1_05f9b2b33d.webp "COUNT function for a single row")](https://www.ionos.co.uk/digitalguide/fileadmin/DigitalGuide/Screenshots_2020/count-function-excel-1.png) Add up the number of cells containing numbers.       This formula gives you the number of cells containing numbers in a single row. You can also expand the search to an entire worksheet or **include specific ranges** if there are columns in the table you do not want to include.

```none
=COUNT(B2:E5;G2:J5)
```

You can **combine COUNT with other functions**. For example, you can calculate a mean from the number of cells counted in various ranges.

```none
=AVERAGE(COUNT(B2:E5);COUNT(G2:J5);COUNT(L2:O5))
```

[![Image: Combining COUNT and AVERAGE in Excel](https://www.ionos.co.uk/digitalguide/fileadmin/_processed_/8/c/csm_count-function-excel-2_e8df591f43.webp "Combining COUNT and AVERAGE in Excel")](https://www.ionos.co.uk/digitalguide/fileadmin/DigitalGuide/Screenshots_2020/count-function-excel-2.png) Combine COUNT with other functions for more complex tasks       In this example, you are counting the cells with numbers in multiple ranges (independently) and then calculating the mean value.

## COUNTA &amp; COUNTBLANK: Two related functions

Count only lets you count the cells with numbers. It does not include text that is not treated as numbers or Boolean values. This allows you to analyse numbers separately from other content. However, if you want to **include all values**, **COUNTA** can help. The function’s structure is identical to the COUNT function.

For example, **COUNTA** can be used to display the attendance rate at meetings in a given month.

```none
=COUNTA(B2:E5;G2:J5)/32
```

[![Image: COUNTA function with simple division](https://www.ionos.co.uk/digitalguide/fileadmin/_processed_/2/6/csm_count-function-excel-3_7fdb4a7305.webp "COUNTA function with simple division")](https://www.ionos.co.uk/digitalguide/fileadmin/DigitalGuide/Screenshots_2020/count-function-excel-3.png) You can use the COUNTA function to count all non-blank cells.       In this example, we want to count all non-blank cells and divide them by the number of all available cells. Attendance is indicated with an “x” in the respective cell. If we now format the resulting cell as a percentage, we can determine the percentage attendance rate.

However, sometimes you want to count all the cells that are empty. You can do that using Excel’s **COUNTBLANK** function. This function also shares the same structure as the other two functions, but can only include one argument. As a result, you can’t include multiple ranges in one function, you have to aggregate the totals.

```none
=COUNTBLANK(B2:E5)+COUNTBLANK(G2:J5)
```

[![Image: Adding two COUNTBLANK functions](https://www.ionos.co.uk/digitalguide/fileadmin/_processed_/b/f/csm_count-function-excel-4_2109190b71.webp "Adding two COUNTBLANK functions")](https://www.ionos.co.uk/digitalguide/fileadmin/DigitalGuide/Screenshots_2020/count-function-excel-4.png) COUNTBLANK determines which cells are empty.       If you add COUNTA and COUNTBLANK, the result is always **the number of cells** in the range analysed. This can be useful, for example, if we go back to our formula for calculating the attendance rate.

```none
=COUNTA(B2:E5;G2:J5)/(COUNTA(B2:E5;G2:J5)+COUNTBLANK(B2:E5)+COUNTBLANK(G2:J5))
```

[![Image: Combining COUNTA and COUNTBLANK in Excel](https://www.ionos.co.uk/digitalguide/fileadmin/_processed_/9/b/csm_count-function-excel-5_1dd083ce4d.webp "Combining COUNTA and COUNTBLANK in Excel")](https://www.ionos.co.uk/digitalguide/fileadmin/DigitalGuide/Screenshots_2020/count-function-excel-5.png) If you add the two functions, you get the number of cells in a selected range.       In this formula, you no longer need to enter the total number of cells manually. Instead, you calculate it from the total of all blank and non-blank cells.

---

### Tip

The [COUNTIF](https://www.ionos.co.uk/digitalguide/online-marketing/web-analytics/countif-in-excel/ "COUNTIF in Excel") function gives you even more control when selecting criteria. For example, you can use it to have Excel search for specific terms.

---


This is a markdown version of: [https://www.ionos.co.uk/digitalguide/online-marketing/online-sales/excel-count-function/](https://www.ionos.co.uk/digitalguide/online-marketing/online-sales/excel-count-function/) for AI/LLM consumption.