If you need to count entries in a sheet fast, learning Google Sheets how to use COUNTIF saves time and removes guesswork. It lets you count cells that match one condition, such as a status, a text label, a number, or a value in a column. Once you understand the pattern, you can also use COUNTA, COUNT, and COUNTIFS for related counting tasks without building complicated formulas.
What COUNTIF does in Google Sheets
COUNTIF counts cells in a range when they meet one rule. That rule can be a number, text, a comparison, or a wildcard match. For example, it can count how many cells contain Done, how many sales are above 100, or how many names appear in a list.
The basic structure is simple:
=COUNTIF(range, criterion)
range is the cells you want to check, and criterion is the condition they must match. If you want a count formula for a single column, you point COUNTIF at that column and tell it what to look for.
COUNT, COUNTA, and COUNTIF explained
Google Sheets has a few count functions, and each one does a different job. COUNT counts cells with numbers only. COUNTA counts non-empty cells, including text, numbers, and formulas. COUNTIF counts cells that meet one condition, which makes it the best choice when you need a specific value count.
Use COUNT for numeric columns, COUNTA when you want to know how many cells have anything in them, and COUNTIF when you want to count cells with text, a number threshold, or a specific label.
How to use COUNTIF step by step
To count values in a column, enter COUNTIF in an empty cell and give it the range and condition. If your data is in column A and you want to count every cell with the word Paid, the formula is straightforward.
=COUNTIF(A:A, “Paid”)
Use these steps when you build the formula yourself:
- Click the cell where you want the result.
- Type =COUNTIF(.
- Select the range to count, such as A:A or A2:A100.
- Type a comma.
- Enter the criterion in quotes if it is text, or without quotes if it is a number comparison.
- Close the parenthesis and press Enter.
If your sheet uses semicolons instead of commas, match your local separator setting. The formula structure stays the same.
Count specific values with COUNTIF
Use COUNTIF when you need to count specific values in a list. To count how many times Blue appears in column B, use:
=COUNTIF(B:B, “Blue”)
To count a number, use the number directly. To count values greater than 50, use:
=COUNTIF(C:C, “>50”)
Comparison operators need quotes because Google Sheets reads them as text inside the criterion argument.
How to count cells with text in Google Sheets
To count cells with text, use COUNTIF with a wildcard or use COUNTA if you want every non-empty cell. These are not the same thing. COUNTA counts numbers, text, dates, and formulas. COUNTIF can count only cells that contain text or text that matches a pattern.
Count all cells with text
If you want to count cells with text only and ignore numbers, a practical approach is to count all nonblank cells in a text-only range. If the range contains only text entries, =COUNTA(A:A) gives the total.
If the range mixes text and numbers and you need text only, use:
=COUNTIF(A:A, “?*”)
This matches cells with at least one text character. It is the cleanest formula count cells with text solution when your range is mixed.
Count if cell contains text
To count cells that contain specific text anywhere in the cell, use wildcards. For example, this counts cells that contain the word apple anywhere in the text:
=COUNTIF(A:A, “*apple*”)
Use * for any number of characters. This works for partial matches, such as product names, notes, or comments. If you need to count rows with text in a status column, this same pattern works well because it counts every cell that includes your target string.
How to use COUNTIFS for multiple conditions
Use COUNTIFS when one condition is not enough. It counts rows only when every test is true. That makes it the right choice for a COUNTIFS example involving status plus category, date plus region, or any other multi-condition filter.
The structure is:
=COUNTIFS(range1, criterion1, range2, criterion2)
For example, to count orders that are Paid in column A and East in column B:
=COUNTIFS(A:A, “Paid”, B:B, “East”)
This is the formula to use when a simple count function for Google Sheets is not enough. COUNTIFS is the multi-condition version of COUNTIF, and it keeps the logic clear as your sheet grows.
Why COUNTIF is not working
When COUNTIF is not working, the problem is usually the criterion format, the range, or hidden characters in the data. Start with the formula syntax. Text criteria need quotes, while cell references need to be written correctly. A comparison like greater than 10 must appear as “>10”.
Next, check spacing and exact spelling. Blue is different from Blue with a trailing space. If copied data contains invisible spaces, COUNTIF will miss it. Use TRIM in a helper column when necessary.
Also check whether you are counting the correct range. If your data starts at row 2 and row 1 has headers, use A2:A1000 instead of the full column if you want tighter control over the result.
Common COUNTIF fixes
- Wrap text criteria in quotes, such as “Done”.
- Wrap comparison criteria in quotes, such as “>=100”.
- Use wildcards for partial text matches, such as “*text*”.
- Remove extra spaces from source data.
- Use COUNTIFS when more than one condition is required.
Practical examples you can reuse
These examples cover the most common count formula tasks in Google Sheets.
- =COUNT(A2:A100) counts only numbers.
- =COUNTA(A2:A100) counts all non-empty cells.
- =COUNTIF(A2:A100, “Yes”) counts a specific text value.
- =COUNTIF(A2:A100, “>0”) counts positive numbers.
- =COUNTIF(A2:A100, “*urgent*”) counts cells containing a word or phrase.
- =COUNTIFS(A2:A100, “Open”, B2:B100, “North”) counts rows matching two conditions.
If you want to count cells with specific text in a column, COUNTIF is the fastest tool. If you want to count the number of cells with text across a mixed range, use a text pattern. If you want every filled cell regardless of content, use COUNTA.
Frequently Asked Questions
What is the Google Sheets function for count?
The main count functions are COUNT, COUNTA, COUNTIF, and COUNTIFS. COUNT counts numbers only. COUNTA counts non-empty cells. COUNTIF counts cells that meet one condition. COUNTIFS counts cells that meet multiple conditions.
How do I count cells with text in Google Sheets?
Use =COUNTIF(range, “?*”) to count text cells in a mixed range. If the range contains only text, =COUNTA(range) also gives the total number of filled text cells.
How do I count cells with specific text?
Use =COUNTIF(range, “Text”) for an exact match. Use =COUNTIF(range, “*Text*”) if the text can appear anywhere inside the cell.
What is a COUNTIFS example in Google Sheets?
A simple example is =COUNTIFS(A:A, “Paid”, B:B, “East”). It counts rows where column A equals Paid and column B equals East.
Why does COUNTIF count blank-looking cells?
Those cells usually contain spaces or hidden characters. Clear the data, or use a helper column with TRIM to remove extra spaces before counting.
Related Posts:
Google Sheets
- How to Highlight Cells and Rows in Google Sheets
- How to Remove Duplicates in Google Sheets
- How to Merge Cells in Google Sheets
- How to Insert a Checkbox in Google Sheets
- How to Sort by Date in Google Sheets
- How to Lock a Formula or Cell in Google Sheets
- How to Insert an Image Into a Cell in Google Sheets
- How to Export Google Sheets to CSV (and Import One)
- How to Protect Cells and Sheets in Google Sheets
- How to Add a Header Row in Google Sheets
- How to Insert or Remove Page Breaks in Google Sheets
- How to Make a Graph in Google Sheets
- How to Insert Multiple Columns in Google Sheets
- How to Insert Multiple Rows in Google Sheets
- Google Sheets Formulas: The Essentials With Examples
- How to Alphabetize in Google Sheets
- How to Use VLOOKUP and XLOOKUP in Google Sheets
- How to Insert a Hyperlink in Google Sheets
- How to Sort Numbers in Order in Google Sheets
- How to Link Google Sheets to Google Calendar
- How to Save Google Sheets to Your Computer
- How to Rename a Column Header in Google Sheets
- How to See Edit History in Google Sheets
- How to View Hidden Sheets and Rows in Google Sheets
- How to Remove Gridlines in Google Sheets
- How to Calculate Days Between Dates in Google Sheets
- How to Calculate Totals in Google Sheets
- How to Delete Multiple Google Sheets at Once
- How to Change Cell Color With a Formula in Google Sheets
- How to Convert Google Sheets to Excel