COUNTIF TRUE in Google Sheets: Count Boolean Values

How-to basics · Updated November 3, 2026

COUNTIF TRUE in Google Sheets: Count Boolean Values

To count cells whose value is the Boolean TRUE in Google Sheets, use =COUNTIF(A2:A20,TRUE), replacing A2:A20 with your range. This is especially useful for counting checked checkboxes, since a standard checked checkbox evaluates to TRUE and an unchecked one to FALSE.

How COUNTIF handles TRUE

COUNTIF checks a range against one condition and returns the number of cells that meet it. Its basic structure is COUNTIF(range, criterion). For a logical TRUE criterion, enter TRUE without quotation marks. The function then counts matching values; it does not change the cells or add up the contents of the range.

For example, with Boolean values in A2:A20, the formula in the opening paragraph counts how many of those cells are TRUE. If six cells contain TRUE and the rest contain FALSE or blanks, the result is 6. The result is a number, so you can use it in another calculation, a chart, or a summary cell.

TRUE and FALSE are logical values in Sheets, not merely words that happen to be capitalized. They commonly come from checkboxes, logical formulas, or other spreadsheet operations. A cell displaying TRUE can also contain text typed or imported as the word “TRUE”; that difference can matter when a count does not match expectations.

Count checked Google Sheets checkboxes

Google Sheets checkboxes use TRUE for checked and FALSE for unchecked by default. To add them, select the cells and choose Insert > Checkbox. Then count checked boxes with COUNTIF. For example, if the checkboxes are in C2:C50, =COUNTIF(C2:C50,TRUE) returns the number that are checked.

This makes a simple task tracker easy to summarize. Put tasks in column A and checkboxes in column C; the count tells you how many tasks have been marked complete. To count unchecked boxes instead, use FALSE as the criterion. With checkboxes in C2:C50, =COUNTIF(C2:C50,FALSE) counts the unchecked cells. Be aware that a blank cell is not an unchecked checkbox, even if it looks empty beside the list.

Checkboxes can also use custom checked and unchecked values. Select the checkbox cells and open Data > Data validation; in the checkbox criteria, choose custom values and specify what checked and unchecked should return. If the checked value is, for example, the text “Done” rather than the Boolean TRUE, count that value instead. With those custom checkboxes in C2:C50, =COUNTIF(C2:C50,"Done") counts checked items. The criterion must match the value the checkbox actually stores.

Count TRUE with another condition

Use COUNTIFS when a row must meet more than one condition. It evaluates corresponding ranges together: one condition range and criterion for each requirement. For example, suppose A2:A6 contains checkbox values and B2:B6 contains regions. The rows are TRUE/West, TRUE/East, FALSE/West, TRUE/West, and TRUE/West. With those values in place, =COUNTIFS(A2:A6,TRUE,B2:B6,"West") returns 3: three rows are both checked and marked West.

All the ranges in COUNTIFS should cover the same number of rows and align row by row. If one range starts at row 2 and another at row 3, the conditions will be compared against different records and the result may be misleading. For more conditions, add another range and criterion pair, such as a date range and a date criterion.

You can put the criterion in a cell rather than writing it directly in the formula. With Boolean values in A2:A20 and a Boolean TRUE value in C1, =COUNTIF(A2:A20,C1) counts entries matching the value in C1. This is useful when a report needs to switch between counting TRUE and FALSE without editing the formula.

Boolean TRUE versus the text “TRUE”

A cell can display TRUE while storing either a logical value or text. A checkbox and a formula such as =1=1 produce a logical value. By contrast, importing a CSV file or typing an apostrophe before TRUE can leave the cell holding text. These values may look alike on screen, but their types differ, and a formula designed for Boolean values may not count text as intended.

One way to check a single cell is to use ISLOGICAL. If the value is in A2, =ISLOGICAL(A2) returns TRUE when A2 contains a logical value and FALSE when it does not. For text imported into a larger range, inspect representative cells or use an explicit text-only count. With possible text values in A2:A20, =SUMPRODUCT(--ISTEXT(A2:A20),--(A2:A20="TRUE")) counts cells that are text and equal to TRUE. This is useful for diagnosis; it is not necessary for ordinary checkbox counts.

If data should be Boolean, the cleanest fix is usually to convert or re-enter it consistently rather than mixing text and logical values. For example, replace imported text with actual checkboxes or a formula that returns a logical result. If the text is meaningful and should remain text, count it as text and keep the criterion consistent. Avoid changing the criterion at random: first identify the stored value and type.

Blanks, formulas, and range choices

COUNTIF counts matching results, including results produced by formulas. If a cell contains a formula that evaluates to TRUE, it can be counted just like a checkbox that evaluates to TRUE. COUNTIF does not inspect the formula’s written expression; it uses the cell’s current result.

Choose a range that covers the data but not unrelated cells. A bounded range such as A2:A500 can be easier to understand and may be more efficient than an entire-column reference in a large or complex sheet. If you use an entire column, such as A:A, remember that the header and any other TRUE values in that column can affect the result. Keep summary formulas outside the range they count so they do not introduce confusing dependencies.

Blank cells are not FALSE checkboxes. If you need to count unchecked items in a list where some rows have no checkbox yet, using FALSE counts only cells that actually contain the Boolean FALSE. It will not count every empty row as an unfinished task. That distinction is often important in forms and partially completed trackers.

Common reasons the count looks wrong

  • The formula returns zero: Check that the range points to the checkbox or status cells, not the task names. Also confirm that the cells contain Boolean TRUE rather than text.
  • The count is too high: Look for additional TRUE values in the selected range, including headers, notes, or hidden rows. Hiding rows does not by itself remove them from a COUNTIF range.
  • Custom checkbox values are in use: Count the custom checked value, such as “Done,” rather than TRUE.
  • The formula shows an error: Check that the parentheses are balanced and that the range is valid. In Sheets’ standard English-language syntax, commas separate the arguments; spreadsheet locale settings can affect formula separators.
  • COUNTIFS gives an unexpected result: Make sure each condition range is the same size and that the values on each row belong together.

Also distinguish a formula result from its display. Formatting can affect how a value appears, but changing a cell’s visual format does not necessarily convert text into a Boolean value. When in doubt, test the type with ISLOGICAL or inspect the source data before rebuilding the count.

COUNTIF compared with other counting methods

For a straightforward count of TRUE values, COUNTIF is generally the clearest choice: the range and the condition are visible at a glance. COUNTIFS is the natural next step when a row must satisfy multiple conditions, such as checked status plus a particular region or owner.

SUMPRODUCT can combine array tests and is handy for more specialized checks, including distinguishing text from logical values, as shown above. Its formulas can be harder to read, so it is not an automatic improvement over COUNTIF. If you only need the number of checked default checkboxes, use COUNTIF unless you have an additional condition or a specific data-type problem to address.

For a visual count rather than a formula result, Google Sheets also offers filtering and summaries, but those approaches do not replace a reusable count cell. In Microsoft Excel, the basic COUNTIF formula is also available and works similarly for Boolean values. This page’s menu paths and checkbox steps refer to Google Sheets in a web browser; Excel has different checkbox controls and interface commands.

Frequently Asked Questions

How do I count checked boxes in Google Sheets?
For standard checkboxes in C2:C50, enter =COUNTIF(C2:C50,TRUE). It counts checked boxes because their value is TRUE.

How do I count unchecked checkboxes?
For default checkbox values in C2:C50, use =COUNTIF(C2:C50,FALSE). It counts unchecked boxes, not blank cells without a checkbox.

Should TRUE be in quotation marks in COUNTIF?
For a logical TRUE criterion, write TRUE without quotes, as in =COUNTIF(A2:A20,TRUE). Quotation marks indicate a text criterion and can behave differently when your cells contain text rather than Boolean values.

Why does COUNTIF return zero when cells show TRUE?
The cells may contain the text “TRUE,” use custom checkbox values, or fall outside the selected range. Check the cell type with ISLOGICAL and verify the checkbox settings and range.

Can COUNTIF count TRUE only in one category?
Yes. Use COUNTIFS with one condition for TRUE and another for the category. Make sure both condition ranges cover the same rows, so each status is matched with its correct category.

Related

Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.

More in How-to basics

Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources

Spotted an error in this guide? Let us know.