• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

Sutevski

Because everything matters...

  • HomeStart Here
  • Tools/AppsThe best tools for you
  • ProductivityIncrease your productivity
  • AnalyticsAnalyse like a pro
  • Rituals/HabitsRituals for success
  • Contact UsIf you have questions

How to Use UNIQUE Function in Google Sheets?

August 25, 2018 By Dragan Sutevski

How to Use UNIQUE Function in Google Sheets?

When I analyze data, many times, I need to group different data source one with another. In such a situation, there is a need for playing with large datasets. One of the functions that I use in many cases to make my data clean when combining different data sources is the UNIQUE function in Google Sheets. This is one of the simplest functions.

For example, I can have several thousands of rows of data that will contain the unique number of customer. From this data, I can not see how much unique customers I have in the data. Or sometimes I want to create another table that will contain my unique customer ID, gender, marital status, city and region from my initial table. Here is my initial table with the data related to transactions for a company.

As you can see from the data, in this table, we have the following:

  • ID – this is transaction ID that is given automatically by the system.
  • Transaction Date – Date when the transaction is made.
  • Revenue – How much revenue we collect with the specific transaction?
  • Region – From which region is the customer for the specific transaction?
  • Sales team – Which sales team made the specific transaction?
  • Customer ID – Unique ID of each customer
  • Gender – What is the gender of the customer?
  • Marital status – What is the marital status of the customer?
  • City – From which city come the customer for the specific transaction?
  • Product family – What is the product family for the products that the specific customer by with the specific transaction?

How Much Unique Customers I Have in this Dataset?

I want to make a column with all customers IDs from the column “F” in my initial table. As you can see in column “F,” we have different customers IDs for different transactions on different days. For example, on the January 2nd customer with the ID F0005 have a transaction with revenue of $6.461,00 (row 3). But, the same customer, the next day also make a revenue of $9.720,00 (row 6). So, specifically, I want to have a column that will contain all customers that have transactions in the analyzed period.

The simplest way, to do this is to use the UNIQUE function in Google Sheets.

I want this column to be in column L in Google Sheets. So, I will select the L1 cell and write the following formula:

=UNIQUE(F:F)

When I hit the return button, we will get the following results.

Google Sheets returns in column L unique rows from column F, discarding all duplicate values. Rows are returned in the order in which they first appear in the source range.

Now, you can see that the F0005 in the cell F6 is not presented in the new column L.

Creating Other Columns Using UNIQUE Function in Google Sheets

As I describe previously, here, I want to have unique grouped data for customer ID, gender, marital status, city and region from my initial table. This task can be easily done by using the UNIQUE function in Google Sheets.

The first thing that we need to do here is to create “Named range” for the data we want to include in our new table. I have already explained how you can create in using VLOOKUP function in Google Sheets. You can check this article.

Here I will select the columns for Customer ID, gender, marital status, city and region and with the right click will choose “Define named range…” In the Named range dialog box, I will name this range as “Customers.” Now, I can use the UNIQUE function in Google Sheets, and with the magic, Google Sheets will do the job automatically.

But let’s do this. First I will open a new sheet in Google Sheets, and in the A1 cell will start typing the function:

=UNIQUE(Customers)

After hitting return, I will get what I want to get.

Now, I can use this table as a reference data for my customers, or to closely look into all my customers in a given period, or to use as the relation table for another analysis of data where I have the record for the customer’s ID. For example, I can relate this table with the data from customer relationship management software where I have the same Customer IDs, but additional data that aren’t present in the table we get here like, number of contacts, offers and so on. In such a way I will get the new table with additional descriptions of each customer. So, it will be easier to make correlations between different variables related to customers.

Related

Primary Sidebar




Get Our Newsletter

Signup Today and Get Regular Free Tips and Tricks to Improve Your Life

Recent Posts

  • Increase Your Own Creativity to Achieve the Success You Want to Achieve
  • Improve Your Note-Taking Skills to Take Notes Like a Pro
  • Spark Email Client of Choice – Why I Choose Spark?
  • How to Improve Yourself When You’re Doing Something Wrong
  • Drafts App – the Central Point of Your Capturing System
  • How to Build High Level of Self-Confidence
  • Here is How to Develop a System for Effective Time Management
  • 7 Small Changes That Will Make a Difference in Your Life
  • How to Declutter Your Home Fast With Following Extreme Decluttering Tips
  • Using COUNTIF Function in Google Sheets to Describe Categorical Variable
  • Twitter
  • Facebook
  • LinkedIn
  • Instagram
  • Contact Us

Privacy Policy | Refund Policy |Copyright Dragan Sutevski © 2023

We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “Accept”, you consent to the use of ALL the cookies.
Do not sell my personal information.
Cookie SettingsAccept
Manage consent

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. These cookies ensure basic functionalities and security features of the website, anonymously.
CookieDurationDescription
cookielawinfo-checkbox-analytics11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics".
cookielawinfo-checkbox-functional11 monthsThe cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional".
cookielawinfo-checkbox-necessary11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary".
cookielawinfo-checkbox-others11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other.
cookielawinfo-checkbox-performance11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance".
viewed_cookie_policy11 monthsThe cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data.
Functional
Functional cookies help to perform certain functionalities like sharing the content of the website on social media platforms, collect feedbacks, and other third-party features.
Performance
Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.
Analytics
Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc.
Advertisement
Advertisement cookies are used to provide visitors with relevant ads and marketing campaigns. These cookies track visitors across websites and collect information to provide customized ads.
Others
Other uncategorized cookies are those that are being analyzed and have not been classified into a category as yet.
SAVE & ACCEPT