Count All Types of Data With Google Spreadsheets COUNTA

Count All Types of Data With Google Spreadsheets COUNTA

Count All Types of Data With Google Spreadsheets COUNTA GA S REGULAR Menu Lifewire Tech for Humans Newsletter! Search Close GO Software & Apps > Google Apps

Count All Types of Data With Google Spreadsheets COUNTA

Keep track of your data in a Google Sheets

By Ted French Ted French Writer Former Lifewire writer Ted French is a Microsoft Certified Professional who teaches and writes about spreadsheets and spreadsheet programs. lifewire's editorial guidelines Updated on October 18, 2019 Tweet Share Email Tweet Share Email

In This Article

Expand Jump to a Section Overview Syntax and Arguments Example: Count Cells Step-by-Step: Enter With Auto-Suggest COUNT vs COUNTA Use the Google Sheets COUNTA function to count text, numbers, error values, and more in a selected range of cells. Learn how with these step-by-step instructions.

COUNTA Function Overview

The Google Sheets COUNT function counts the number of cells in a selected range that contain only a specific type of data. The COUNTA function counts the number of cells in a range containing all types of data such as: Numbers Error values such as #DIV/0! in cell A3 Dates Formulas Text data Boolean values (TRUE/FALSE) The function ignores blank or empty cells. If data is later added to an empty cell, the function automatically updates the total to include the addition.

The COUNTA Function Syntax and Arguments

A function's syntax refers to the layout of the function and includes the function's name, brackets, comma separators, and arguments. The syntax for the COUNTA function is: =COUNTA(value_1,value_2, ... value_30) The arguments are: value_1 (required): Cells with or without data that are to be included in the count. value_2, ... value_30 (optional): Additional cells to be included in the count. The maximum number of entries allowed is 30. The value arguments can contain: Individual cell references to the location of the data in the worksheet. A range of cell references. A named range.

Example Count Cells With COUNTA

In the example shown in the image below, the range of cells from A2 to B6 contains data that is formatted in a variety of ways plus one blank cell to show the types of data that can be counted with COUNTA. Several cells contain formulas that are used to generate different data types, such as: Cell A3 uses a formula (= B2/B3) to generate the error value #DIV/0!.Cell A4 uses a comparison formula (=B2 > A6) to generate the Boolean value TRUE. To follow along with this tutorial, set up a blank spreadsheet to look like the one above, using the two formulas listed here.

Enter COUNTA With Auto-Suggest

Google Sheets does not use dialog boxes to enter functions and arguments as found in Excel. Instead, Sheets displays an auto-suggest box as the name of the function is typed in a cell. To enter the COUNTA function into cell C2 shown in the image above: Select cell C2 to make it the active cell. This is the location where the function results will display. Enter =COUNTA. As you type, auto-suggest displays the names and syntax of functions that begin with the letter C. When the name COUNTA appears at the top, press Enter to enter the function name and an open parenthesis (round bracket) in cell C2. Highlight cells A2 through B6 to include these cells as the function arguments. Press Enter to add the closing parenthesis and complete the function. The answer 9 appears in cell C2 since only nine of the ten cells in the range contain data. Cell B3 is empty. Deleting the data in some cells and adding it to others in the range A2:B6 causes the function results to update to reflect the changes. Select cell C2 to display the completed formula =COUNTA(A2:B6) in the formula bar above the worksheet.

COUNT vs COUNTA

To show the difference between the COUNT and COUNTA functions, the example in the image below compares the results for both COUNTA (cell C2) and the better-known COUNT function (cell C3). The COUNT function counts cells containing number data and returns a result of five. COUNTA counts all types of data in the range and returns a result of nine. Dates and times are considered numbers in Google Sheets, which is why the data in cells B4 and B5 is counted by both functions. The number 27 in cell A5 was entered as text — as indicated by the default alignment of the data on the left side of the cell — and is only counted by COUNTA. Was this page helpful? Thanks for letting us know! Get the Latest Tech News Delivered Every Day Subscribe Tell us why! Other Not enough details Hard to understand Submit More from Lifewire How to Use the Google Spreadsheets AVERAGE Function How to Round Numbers Down in Excel With the ROUNDDOWN Function How to Count Data in Selected Cells With Excel's COUNTIF Function How to Count Blank or Empty Cells in Google Sheets How to Use a Dynamic Range in Excel With COUNTIF and INDIRECT Count Cells of Data With Excel's SUMPRODUCT Function Use Excel's EOMONTH Function to Add or Subtract Months How to Use Excel's MROUND Function How to Combine the ROUND and SUM Functions in Excel Rounding Numbers in Google Spreadsheets How to Use the COUNTIF Function in Excel Perform Multiple Calculations With Excel Array Formulas Ignore Error Values When Finding the Average in Excel Count Numbers Only With Google Sheets COUNT Function Excel SUMIFS: Sum Only Values Meeting Multiple Criteria How to Calculate Weighted Averages in Excel With SUMPRODUCT Newsletter Sign Up Newsletter Sign Up Newsletter Sign Up Newsletter Sign Up Newsletter Sign Up By clicking “Accept All Cookies”, you agree to the storing of cookies on your device to enhance site navigation, analyze site usage, and assist in our marketing efforts. Cookies Settings Accept All Cookies
Share:
0 comments

Comments (0)

Leave a Comment

Minimum 10 characters required

* All fields are required. Comments are moderated before appearing.

No comments yet. Be the first to comment!

Count All Types of Data With Google Spreadsheets COUNTA | Trend Now | Trend Now