Arrow left
Back to product guides
Google Sheets Formulas

COUNTUNIQUE Function in Google Sheets: Explained

In this article, you will learn how to use the COUNTUNIQUE formula in Google Sheets. 

What does the COUNTUNIQUE formula do in Google Sheets?

This formula allows you to count the number of cells with any duplicates excluded. If there are some duplicates of a particular value in a data set, you apply this formula, and the number of the specific values is counted as one.

How to use the COUNTUNIQUE formula in Google Sheets

  1. Type “=COUNTUNIQUE” or go to “Insert”“Function” (or directly navigate to the “Functions” icon)  “Math”“COUNTUNIQUE”.
  2. Select a range or an array in which you want to count the number of distinctive values.
  3. Press the “Enter” key.
How to insert the COUNTUNIQUE function from the menu

The generic syntax is as follows:

=COUNTUNIQUE(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, ….

Note

  1. 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.
  2. The function does not count the number of entirely blank cells, though it counts the number of cells containing only whitespace(s).
  3. Ensure all values that you want to count don’t include hidden text such as ““ or an apostrophe. For example, if a cell input is “‘7”, it looks like “7”.

The following picture how the formula works. As you can see, while the total number of cells is eight in the chosen range, the function returns five. Why does this happen? - (i) The COUNTUNIQUE formula counts the redundant items (ones highlighted) only once for each item; and (ii) it doesn’t count the number of emply cells.

How the COUNTUNIQUE formula works in Google Sheets with an example

Does the COUNTUNIQUE function count blank cells?

As explained above, it does not count the number of entirely blank cells. If you need to calculate the number of empty cells, you should use the COUNTBLANK formula.

Other formulas related to mathematics and statistics

If you don’t get the right answer to your question in this article or you have other questions related to mathematics or statistics, you may find the answers in the following articles.

Go to the following articles if you want to learn basic formulas in Google Sheets.

How to Do Math in Google Sheets for Beginners

How to Sum Numbers in Google Sheets

How to Use SUMPRODUCT Formula in Google Sheets

How to Use MAX Function in Google Sheets

How to Use MIN Function in Google Sheets

How to Use MEDIAN Function in Google Sheets

How to Use AVERAGE Formula in Google Sheets

How to Use MODE Function in Google Sheets

MOD Function in Google Sheets: Explained

Navigate to the pages below if you need to learn how to sum, count, or average numbers with a condition or multiple conditions. 

How to Use SUMIF Function in Google Sheets - sum up the numbers that meet a criterion

SUMIFS Function in Google Sheets: Explained - sum up the numbers that meet multiple criteria

How to Use COUNTIF Function in Google Sheets - count the number of cells that meet a requirement

How to Use COUNTIFS function in Google Sheets - count the number of cells that meet multiple requirements

AVERAGEIF Function in Google Sheets: Explained - average the figures that meet a standard

AVERAGEIFS Function in Google Sheets: Explained - average the figures that meet multiple standards

Visit the following post if you are interested in learning how to count the number of specific cells.

COUNT Function in Google Sheets: Explained - count the number of cells containing numeric values (except for blank ones)

COUNTA Function in Google Sheets: Explained - count the number of cells incorporating all types of values containing text and date, except for blank ones

COUNTBLANK Function in Google Sheets: Explained - count the number of blank cells

Analyze your live financial data in a snap

Are you learning this formula to build a financial KPI dashboard, or conduct financial analysis? If so, LiveFlow may help you to automate manual workflows and keep numbers updated in real-time. For instance, you can easily compare your Budget versus Actual without any manual work. Furthermore, you can access other templates here, from the simple Income Statement and Operational KPI templates to Multi-Currency Consolidated Income Statement, Balance Sheet, and Cash Flow templates. You can also customize these templates as you want without breaking the automated data inflow.

To learn more about LiveFlow, book a demo.

Automate any custom financial dashboard in Google Sheets with LiveFlow

Learn how to do this step-by-step in the video below 👇

Do you need personal help?

Our team of real people are here to help you any time between 9am and 10pm GMT.
Check Icon
Email us at: founders@liveflow.io
Check Icon
Call us at +1 (415) 650-1711