Gallery
Unique & Duplicates
Share
Explore
Unique & Duplicates

# Unique & Duplicates

## ⁠⁠⁠

Formulas: Unique() and Duplicates()
Unique()
Duplicates()
Deduplicates values from a list
Another way to say it...
Hey Coda, I have a list with duplicate values. Will you pull out just one of each?
Outputs duplicate values in a list
Said differently..
Hey Coda, will you tell me which values in his list have duplicates?

Both Unique() and Duplicate() share the same, single parameter:
Value

Unique/Duplicate(Value)

This is the item you want to locate within the list to check whether it's unique or a duplicate.

## Unique

Unique() is a powerful formula to find the unique values within a list. Lets just take the list of people from our for example.
Here is a list of the first 25 peoples ages:
1488111435164648246739
And here is the list of the unique ages
14881135164648246739

Now lets look at the whole . Unique can help us answer questions like:
How many different aged individuals are there?
10
How many unique favorite animals are there?
11
How many different birthdays will be have to celebrate?
11
How many different email domains do people have?
9

## Duplicates

Duplicates() is a relatively new additions to the CFL (Coda Formula Language), and while it may seem like a life-saver at first, its unfortunately not as helpful as you might think when attempting to identify and squash duplicate values in a list.

Before we get to use-cases though, let’s just learn how it works.
Here’s the same list of 25 people’s ages that we had in the Unique() section.
1488111435164648246739

And here's is the list of the duplicate values using Duplicates().
14
Look at the values and data that Duplicates() returns. What kind of information does it give you, and what type of information does it not provide? Think about it for a moment and type your thoughts into the boxes below. Then, when you are done, press the button to view some potential answers
Duplicates provides the following data
Duplicates does NOT provide. . .
1
There are no rows in this table

## ⁠⁠⁠

Done
Create a warning message if there are duplicates within vote results
Done
Done

Share