# Count Cells Containing TRUE or FALSE in Excel

Count the number of cells that contain TRUE, FALSE, or one of the two. This lets you count the logical values in a range in Excel.

### Sections:

Count Cells that Contain FALSE

Count Cells that Contain TRUE or FALSE

## Count Cells that Contain TRUE

```
=COUNTIF(A1:A5,TRUE)
```

**A1:A5** is the range in which to count; change it to fit your data.

**TRUE** is the value that we want to count. Note that this does not require quotation marks around it; TRUE and FALSE are special elements in Excel.

Result:

## Count Cells that Contain FALSE

```
=COUNTIF(A1:A5,FALSE)
```

**A1:A5** is the range in which to count; change it to fit your data.

**FALSE** is the value that we want to count. Note that this does not require quotation marks around it; TRUE and FALSE are special elements in Excel.

Result:

## Count Cells that Contain TRUE or FALSE

Essentially, we now combine the last two examples into one formula.

```
=COUNTIF(A1:A5,TRUE)+COUNTIF(A1:A5,FALSE)
```

Result:

## Notes

This is pretty basic COUNTIF stuff combined with the logical values of TRUE and FALSE and, as you can see, it's not complex. The one thing to remember is that you do not put quotation marks around TRUE and FALSE; now, you can get away with doing that, but it's not necessary.

Download the sample file for this tutorial to work with these examples in Excel.

Tutorial: You can multiply numbers by TRUE and FALSE in Excel. This effectively allows you to elimi...

Tutorial: Find if a cell or range of cells contains a specific value in Excel. This method can be us...

Tutorial: How to convert numbers into the TRUE and FALSE Boolean values in Excel. This is very impor...

Tutorial: Change True to False and False to True with this simple function in Excel. To do this, we ...

Tutorial: How to check if a cell is empty or is not empty in Excel; this tutorial shows you a couple...

Tutorial: Add values from every x number of rows in Excel. For instance, add together every other va...