Count Unique and Distinct Values For Your Data

count unique values in excel

It can be challenging to work with big volumes of data in Excel. There may be many repetitions of some values. Several data entries may need to be considered when carrying out any function to improve accuracy. You will need to count the values to arrange the data or even get statistics from it.

Manually counting the values would be practically difficult with enormous data. In particular, tracking specific or unique values can be difficult. Thankfully, Excel has numerous methods for counting different and unique data. One of the best functions to use is count unique in Excel.

  • Do you possess a large collection of data?
  • Is it difficult to look for some special and distinctive values?
  • Does the number of different or unique values in your data set need to be known?

A lengthy list with a broad range of values is typically what we mean when we refer to a data set. Counting and displaying specific values occasionally makes our data list more useful and brief. Consider a customer’s name list, for instance. Some of them are likely brought up more than once. Thus, a list of the names that are only referenced once is required. Stated differently, we require unique names.

Spreadsheets are used for database and data analytics to generate reports and gain insights from the data. Spreadsheets are useful tools and there are numerous ways through which data has to be sorted and represented.

Let’s say you have a client list. You must count the number of clients, conditionally or typically filter them, and then compile a list. However, there are too many repeating values in your dataset. You can solve this problem by counting distinct values.

What Exactly Is Distinct And Unique Value?

Let’s say we have this collection of data:

1, 2, 4, 8, 2, 7, 8, 9, 1, 6.

Unique Values: As you can see, several of these ten values are referenced more than once. For example, 4, 7, 9, and 6. These values are unique.

Distinct Values:

Distinct values are those that, whether unique or repeated again, emerge in a data set for the first time.

These data can be tallied, filtered conditionally or normally, and compiled into a list.

The If and Countif functions provide the simplest method for counting and displaying these values. Now, let’s use your data collection to understand how to use them.

Show And The Count By if And Countif Function

Display and tally By Counting And If and Count Functions:

We distinguish between values that are unique and distinct if functions.

Unique Values in Excel: How Do You Display Them?

First you must identify unique values in our data collection before we can count them. To do so, adhere to the following steps:

  • Give your data set a title.
  • Add a column to display the outcome.
  • Add the notation =IF(COUNTIF(data set range, the data set’s first cell)=1, “Unique,””).
  • Pay close attention to and ensure that the dollar symbol ($) fixes the range of your data set.
  • Enter a dollar symbol to fix the first cell in your data set.
  • The sentence structure

Our example indicates that the syntax is:

COUNTIF($A$2:$A$11,$A2)=1, “Unique”, “”)

Take caution when handling the money signs.

In Excel, How Do I Display Distinct Values?

To specify distinct values using the If and Countif functions, we proceed as in the preceding phases.

The sentence structure

Our example indicates that the syntax is:

“Distinct,” “”) =IF(COUNTIF($A$2:$A2,$A2)=1,

Take caution when handling the money signs.

The Simplest Method For Counting Unique And Distinct Values

You can now just use the Countif formula to count these values. For instance, take the following actions to count the distinct values:

Follow the mentioned procedures to display your data as Unique or Distinct values.

Choose a cell and type the formula Countif into it.

=countif(data range1, data range2[optional],…, “Distinct”) is the formula.

You may now see your total number of distinct values.

Distinct Values And Count Unique Based On Color

Using this technique, you can simply count numbers in Excel, which allows you to distinguish values by color. So, let’s give it a shot. You may apply the default rule to count unique values. Having said that, since Conditional Formatting lacks a default rule, we must construct the formula for the Distinct values.

Utilizing Conditional Formatting to Count Unique Values

To quickly ascertain your unique value, simply follow these procedures.

  • Choose the data set you want to use.
  • Select the Home tab.
  • Click the Conditional Formatting button in the Style section.
  • Press the Rules for Highlighting Cells.
  • From the menu, choose Duplicate values.

Select Unique from the Duplicate values dialogue box, then select the format (Light red fill with dark red writing, for example) that fills the cells according to color.

You can find it helpful to count unique values while working with huge datasets.

There were duplicate names in the name list you used here, but after computing unique numbers, we determined that the list had ten unique names.

All of the techniques you have learned here are helpful in various circumstances, so feel free to apply those you believe to be the best fit for you.