How To Sort Unique Values in Google Sheets

In this tutorial, you will learn how to sort unique values in Google Sheets.

How To Sort Unique Values in Google Sheets

When working with data in Google Sheets, you may need to sort out unique values from a list of values. This can be especially useful if you want to get rid of duplicates.

Google Sheets offers two powerful functions that can help you sort unique values from a list: UNIQUE and SORT.

In this guide, we will explain how to use these functions to sort unique values in Google Sheets. We will also explain how to handle situations where the UNIQUE function returns blank cells.

How To Arrange Unique Values in Google Sheets Alphabetically

Here’s how to arrange unique values in Google Sheets alphabetically.

Step 1

First, select a blank cell to place a new formula to sort unique values.

In this example, we have a list of countries in column A. We want to sort all unique values in this column in column C.

Step 2

We’ll first type in our UNIQUE function. This function returns all unique values in a given list.

Returning only unique values ensures that we get rid of any duplicates in our output.

Step 3

Next, we’ll wrap our UNIQUE function with a SORT function. The SORT function accepts a range as an argument and returns a sorted copy of the range.

The second argument indicates which column to sort with. Since we only have 1 column in our range, we will simply use a value of 1. Next, we’ll set the third argument to 1 to indicate that we want our range to be sorted in ascending order.

Step 4

If we set our third argument to 0 instead, we will arrive at a reverse alphabetical sort or descending order.

Step 5

Some users may notice that the formula described above can sometimes return blank cells. This occurs because the UNIQUE function considers blank cells as having its own unique value.

We can take care of this special case by using the FILTER function.

In the example above, we used the formula:


The NOT(ISBLANK(A:A)) condition will only return TRUE if the value in column A is not blank. The FILTER function then filters out all cells that have been marked FALSE by the condition. This ensures that the UNIQUE function will no longer have to deal with any blank cells.


This guide should be everything you need to sort unique values in Google Sheets.

You may make a copy of this example spreadsheet to test it out on your own.