This article was written by Nicole Levine, MFA. Nicole Levine is a Technology Writer and Editor for wikiHow. She has more than 20 years of experience creating technical documentation and leading support teams at major web hosting and software companies. Nicole also holds an MFA in Creative Writing from Portland State University and teaches composition, fiction-writing, and zine-making at various institutions.
The wikiHow Tech Team also followed the article's instructions and verified that they work.
This article has been viewed 51,814 times.
This wikiHow teaches you how to use the COUNTIF function in Google Sheets to find the number of cells in a range.
Steps
-
1Go to https://sheets.google.com in a web browser. If you’re not already signed in to your Google account, follow the on-screen instructions to sign in now.
-
2Click the file you want to edit. If you prefer to create a new spreadsheet, click the box with a “+” at the top-left corner of the list.Advertisement
-
3Double-click the empty cell where you want the count to appear. This is where you’ll enter the formula.
-
4Type =COUNTIF( into the cell.
-
5Select the cells you want to count. To do this, click and drag the mouse over the entire range. This adds the range to the COUNTIF formula.
- You can also type the range manually in the following format: B2:C4.
-
6Add qualifying criterion after a comma. To count every selected cell regardless of its value, skip this step. Otherwise, type a , and then type the criteria between quotes (""). Here are some examples:[1]
- To count only the cells in B2:C4 with values over 50, your formula would look like =COUNTIF(B2:C4,">50"
- To count only the cells in B2:C4 that say “Yes,” your formula would look like =COUNTIF(B2:C4,"Yes".
-
7Type ) at the end of the formula. This closes the formula.
- Example without criterion: =COUNTIF(B2:C4)
- Example with criterion: =COUNTIF(B2:C4,">50")
-
8Press ↵ Enter or ⏎ Return. The count of selected cells that meet the entered criteria (if applicable) now appears in the cell.Advertisement
About This Article
1. Sign in to Google Sheets.
2. Open a file.
3. Double-click an empty cell.
4. Type =COUNTIF(.
5. Select the cells to count.
6. Add qualifying criteria (optional).
7. Type ).
8. Press ↵ Enter or ⏎ Return.




























































