This wikiHow teaches you how to use the “COUNTIF” function in Google Sheets to find the number of squares or cells in a selection area.
Step
Step 1. Visit https://sheets.google.com via a web browser
If you're not signed in to your Google account yet, follow the on-screen instructions to sign in.
Step 2. Click the file you want to edit
If you want to create a new spreadsheet, click the box with the “+” sign in the top-left corner of the list.
Step 3. Double-click the empty column that you want to use to display the count
In this box, you need to enter the calculating formula.
Step 4. Type =COUNTIF(into the box
Step 5. Select the selection area with the boxes you want to count
Click and drag the cursor over the selection area. After that, the selection will be added to the “COUNTIF” formula.
You can also type the selection area/range manually in the following format: B2:C4
Step 6. Add the qualifying criteria after the comma
To count each selected square, regardless of the data, skip this step. Otherwise, type a comma, and enter the desired criteria between quotation marks (""). Here are some examples:
- To count the boxes in the selection range “B2:C4” with data/numbers above “50”, enter the formula like this =COUNTIF(B2:C4, ">50"
- To count the boxes in the selection range “B2:C4” with the text “Yes”, enter the formula like this =COUNTIF(B2:C4, "Yes".
Step 7. Type) at the end of the formula
After that, the formula will be closed.
- Example of a formula without criteria: =COUNTIF(B2:C4)
- Example formula with criteria: =COUNTIF(B2:C4, ">50")
Step 8. Press Enter. key or Returns.
The number of selected boxes that meet the criteria (if applicable) will be displayed in the box.