How to Sort a Unique List in Excel – 10 Methods

The sample dataset showcases Employee Name, ID No., Salary & Rank.

Dataset

 


Method 1 – Getting a Sorted Unique List

1.1. Using the Advanced Filter

  •  Select the whole dataset.
  • Go to Data tab > Choose Advanced in Sort & Filter.
  • Set the List range as $C$5:$C$14.
  • Keep the Criteria range blank.
  • Check Copy to another location.
  • Check Unique records only.
  • Click OK.

Sort Unique List Using Advanced Filter

This is the output.

Sort Unique List Using Advanced Filter


1.2. Combination of the SORT & UNIQUE Functions

  • Use the following formula:
=SORT(UNIQUE(C5:C14))

C5:C14 is the cell range for the name of the employee.

The UNIQUE(C5:C14) syntax returns unique values and the SORT function sorts the found unique values in ascending order.

Combination of the SORT & UNIQUE Function

The above picture is the output.

Read More: How to Sort by Last Name in Excel


Method 2 – Sorting a Unique List Based on a Value

2.1. Using the Advanced Filter

  • In the Advanced Filter dialog box, set the List range as $B4:$D14 and the Criteria range as $F4:$F5.

Sort Unique List on the Basis of a Value

  • Click OK to see the output.

Sort Unique List on the Basis of a Value


2.2. Using Function

  • Use the following formula:
=SORT(UNIQUE(FILTER(C5:C14, F5=D5:D14)))

C5:C14 is the cell range for the name of the employee, F5 is the given value, and D5:D14 is the cell range for the Rank field.

In the FILTER function, C5:C14  is set as an array. F5=D5:D14 includes the specific value.

The UNIQUE function returns the unique value of the filtered data.

The SORT function sorts the found unique values in ascending order.

  • Press Enter to see the output.

Sort Unique List on the Basis of a Value

Read More: How to Sort Duplicates in Excel


Method 3 – Sorting a Unique List Based on a Cell Range

3.1. Using Advanced Filter

  • In the Advanced Filter dialog box, set the List range as $B$4:$D$14 and the Criteria range as $F$4:$G$5.

List on the Basis of a Cell Range

This is the output.

List on the Basis of a Cell Range


3.2. Using a Function

  • Enter the following formula.
=SORT(UNIQUE(FILTER(C5:C14,(D5:D14>=G5)*(D5:D14<=G6))))

C5:C14 is the cell range for the name of the employee, G5 is the given first value, G6 is the second value, and D5:D14 is the cell range for Rank field.

Excel Sort Unique List on the Basis of a Cell Range

Read More: How to Sort by Name in Excel


Method 4 – Sorting a Unique List Based on a Single Criterion

To sort unique values if the salary is greater than or equal to $50000.

4.1. Using the Advanced Filter

  • In the dialog box, specify the List range as $B$4:$D$14 and the Criteria range as $F$4:$F$5.

List Relying on a Single Criteria

This is the output.

List Relying on a Single Criteria


4.2. Using a Function

  • Enter the formula below.
=SORT(UNIQUE(FILTER(C5:C14, D5:D14>=F5)))

C5:C14 is the cell range for the name of the employee, F5 is the given value, and D5:D14 is the cell range for the Rank field.

List Relying on a Single Criteria


Method 5 – Sorting a Unique List Based on Multiple Criteria

To sort the dataset for a salary greater than or equal to $50000 and for a rank equal to 2:

5.1. Using the Advanced Filter

  • In the dialog box, set the List range as $B$4:$E$14 and the Criteria range as $G$4:$H$5.

Sorting Unique List Relying on Multiple Criteria

This is the output.

Sorting Unique List Relying on Multiple Criteria


5.2. Using a Function

  • Enter the following formula.
=SORT(UNIQUE(FILTER(C5:C14,(D5:D14>=G5)*(E5:E14=H5))))

C5:C14 is the cell range for the name of the employee, G5 is the required salary, H5 is the second value, D5:D14 is the cell range for the Salary field, and E5:E14 is the cell range for the Rank field.

Sorting Unique List Relying on Multiple Criteria

Read More: How to Arrange Numbers in Ascending Order with Excel Formula


Method 6 – Creating a Dynamic Sorted Unique List

  • Select the entire dataset.
  • Go to the Insert tab > click Table.
  • Check My table has headers.

Creating an Excel Table

  • The created table (Table1) with the source data is stored in Excel.
  • Enter the following formula.
=SORT(UNIQUE(Table1))

Creating Dynamic Sorted Unique List

  • Press Enter to see the dynamic list of the sorted unique data.

Creating Dynamic Sorted Unique List

  • Enter new data (ID: 1008) and the list is automatically updated.

Creating Dynamic Sorted Unique List

Read More: How to Sort Merged Cells in Excel


Method 7 – Sorting a Unique List from A to Z (Alphabetically)

  • Enter the formula:
=SORT(UNIQUE(B5:D14))

B5:D14 is the dataset.

Unique List from A to Z(Alphabetically)


Method 8 – Sorting a Unique List from Z to A

  • Enter this formula:
=SORT(UNIQUE(B5:D14), ,-1)

B5:D14 is the dataset, and -1 is the descending order.

Unique List from Z to A

Read More: How to Sort in Excel by Number of Characters


Method 9 – Sort the Unique List Horizontally

  • Use this formula.
=TRANSPOSE(SORT(UNIQUE(C5:C14)))

 C5:C14 is the name of the employee.

Sort Unique List Horizontally


Method 10 – When Some Cells are Blank

To ignore blank cells and sort the unique list in Excel:

  • Enter the formula.
=SORT(UNIQUE(FILTER(C4:C14,C4:C14<>"")))

C4:C14 is the name of the employee, ” ”  ignores blank cells.

When Some Cells are Blank


Things to Remember

Name of Errors When Occurs
#CALC! If the UNIQUE function cannot extract the unique values.
#SPILL! If there is any value in the spill range from which the UNIQUE function will return the list.
#VALUE! If the output (sorted unique values) is not available in the given dataset.

Download Practice Workbook 


 

Related Articles


<< Go Back to Sort in Excel | Learn Excel

Get FREE Advanced Excel Exercises with Solutions!
Md. Abdul Kader
Md. Abdul Kader

MD. ABDUL KADER is an engineer with a talent for Excel and a passion for VBA programming. To him, programming is like a time-saving wizard, making data manipulation, file handling, and internet interactions a breeze. His skill set extends to SWM, GIS, RS, and SPSS. He holds a B.Sc in Urban & Regional Planning from Chittagong University of Engineering and Technology and has shifted to become a content developer. In this role, he crafts technical content centred around... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo