COUNTUNIQUE - Google Docs Editors Help (2024)

Counts the number of unique values in a list of specified values and ranges.

COUNTUNIQUE for BigQuery

Counts the number of unique values in a data column

Sample Usage

COUNTUNIQUE(table_name!fruits)

Syntax

COUNTUNIQUE(column)

  • column: The data column to consider for uniqueness.

Tip: Counting unique rows across multiple columns is not supported

Sample Usage

COUNTUNIQUE(A1:C100)

COUNTUNIQUE(1,1,2,3,5,8,13,A2,B6:B9)

Syntax

COUNTUNIQUE(value1, [value2, ...])

  • value1 - The first value or range to consider for uniqueness.

  • value2, ... - [ OPTIONAL ] - Additional values or ranges to consider for uniqueness.

Notes

  • Although COUNTUNIQUE is specified as taking a maximum of 30 arguments, Google Sheets supports an arbitrary number of arguments for this function.

See Also

DCOUNTA: Counts values, including text, selected from a database table-like array or range using a SQL-like query.

DCOUNT: Counts numeric values selected from a database table-like array or range using a SQL-like query.

COUNTIF: Returns a conditional count across a range.

COUNTA:

Returns the number of values in a dataset.

COUNTBLANK: Returns the number of empty cells in a given range.

COUNT:

Returns the number of numeric values in a dataset.

Examples

COUNTUNIQUE - Google Docs Editors Help (1)

Visit the Learning Center

Using Google products, like Google Docs, at work or school? Try powerful tips, tutorials, and templates. Learn to work on Office files without installing Office, create dynamic project plans and team calendars, auto-organize your inbox, and more.

COUNTUNIQUE - Google Docs Editors Help (2024)

FAQs

COUNTUNIQUE - Google Docs Editors Help? ›

Understanding the CountUnique Function

How to count unique values in Google Docs? ›

The syntax is simple: =COUNTUNIQUE(range), where “range” refers to the cell range containing the values to count. This function efficiently identifies and counts distinct occurrences, providing quick insights into a dataset.

How to countif unique? ›

The COUNTIF function counts how many times each individual value appears in the specified range. In this example, COUNTIF(A2:A10,A2:A10) returns the array {1;2;2;1;2;2;2;1;2} . The IF function evaluates each value in the array returned by COUNTIF, keeps all 1's (unique values), and replaces all other values with zeros.

What is the difference between Countunique and count in Google Sheets? ›

COUNTA counts all values in a dataset, including those which appear more than once and text values (including zero-length strings and whitespace). To count unique values, use COUNTUNIQUE . To count only numeric values use COUNT .

How do countuniqueifs work? ›

Returns the unique count of a range depending on multiple criteria. Counts the number of unique values in a data column, filtered by a set of criteria applied to additional columns.

How do I COUNT the number of unique text cells? ›

Count the number of unique values by using a filter
  1. Select the range of cells, or make sure the active cell is in a table. ...
  2. On the Data tab, in the Sort & Filter group, click Advanced. ...
  3. Click Copy to another location.
  4. In the Copy to box, enter a cell reference. ...
  5. Select the Unique records only check box, and click OK.

How do you COUNT values in Google Docs? ›

The general syntax is as follows: =COUNT(value1, [value2, …]) Value1: This argument should be a cell, range, or array. Value2: If you need to select other ranges, you can add as value2, value3, ….

How do I use countif to avoid duplicates? ›

On the Settings tab, choose "Custom" from the Allow drop down list and enter =COUNTIF($D:$D,D2)=1 into the Formula box.

What is Countunique? ›

Counts the number of unique values in a list of specified values and ranges.

Does Countunique count blanks? ›

The COUNTUNIQUE function counts the number of unique values. So, even when a specific value appears more than once in a data set, the particular value is measured only once. The function does not count the number of entirely blank cells, though it counts the number of cells containing only whitespace(s).

How do I list only unique values in Google Sheets? ›

To get distinct values from another sheet in Google Sheets, use =UNIQUE(SheetName! range), replacing 'SheetName' and 'range' with the relevant sheet name and cell range. If you want to get a list of unique values you need to add the second parameter and set it to TRUE as in =UNIQUE(SheetName!

What is the difference between Countif and Countuniqueifs? ›

However, COUNTUNIQUEIFS counts unique values, whereas COUNTIFS counts all values that meet the specified criteria.

How do I remove duplicates in a column in Google Sheets? ›

Remove rows with repeat data
  1. On your computer, open a spreadsheet in Google Sheets.
  2. Select the data range that you'd like to remove duplicates in. ...
  3. At the top, click Data Data cleanup. ...
  4. Select which columns to include, and whether or not the data has headers.
  5. Click Remove duplicates.

How to count duplicates in Google Sheets? ›

Use the COUNTIF formula to find duplicates.

The COUNTIF formula [=COUNTIF (A:A, A1)>1] tells Sheets where to look for duplicates. The information in the parentheses represents the column you want to track and the specific cell you want to start with.

How do I get the list of unique values from a column in Google Sheets? ›

To get distinct values from another sheet in Google Sheets, use =UNIQUE(SheetName! range), replacing 'SheetName' and 'range' with the relevant sheet name and cell range. If you want to get a list of unique values you need to add the second parameter and set it to TRUE as in =UNIQUE(SheetName!

How do you count unique values in a set? ›

Method 1: Using a Set

A set in Python is an unordered collection of unique elements, meaning that duplicate values are automatically removed when a list is converted to a set. Once we have a set, we can easily determine the count of unique values using the len() function.

What is the formula for unique numbers in Google Sheets? ›

When you type =UNIQUE(A2:A15) into cell C2 and hit the Enter key, the UNIQUE function returns all the unique values from range A2:A15. Results start appearing from C2 (the cell where the function is) and flow downwards in the sheet, as you can see in the image below.

How do I count unique non blank cells in Google Sheets? ›

The range argument refers to the range of cells that you want to count. For example, if you want to count the non-empty cells in the range A1, you can enter the formula =COUNTA(A1:A10) in a cell. The function will return the number of non-empty cells in the range.

Top Articles
Latest Posts
Article information

Author: Geoffrey Lueilwitz

Last Updated:

Views: 5978

Rating: 5 / 5 (60 voted)

Reviews: 91% of readers found this page helpful

Author information

Name: Geoffrey Lueilwitz

Birthday: 1997-03-23

Address: 74183 Thomas Course, Port Micheal, OK 55446-1529

Phone: +13408645881558

Job: Global Representative

Hobby: Sailing, Vehicle restoration, Rowing, Ghost hunting, Scrapbooking, Rugby, Board sports

Introduction: My name is Geoffrey Lueilwitz, I am a zealous, encouraging, sparkling, enchanting, graceful, faithful, nice person who loves writing and wants to share my knowledge and understanding with you.