Excel - Combine the SORT, UNIQUE, and COUNT functions

Excel - Combine the SORT, UNIQUE, and COUNT functions

Excel has dynamic array functions. Two of the dynamic array function are SORT and UNIQUE. I will combine SORT and UNIQUE and also combine them with COUNT and the COUNTA functions. This came from a user that asked how many unique zip codes were in a spreadsheet.

SORT and UNIQUE Functions combined

**SORT and UNIQUE Functions combined**

YouTube Video

Excel - Combine the SORT, UNIQUE, and COUNT functions

Excel Function used in this video

The following functions are used in the video:

1. Unique 2. Sort 3. Count 4. CountA 5. Text

Unique Function

The UNIQUE function returns a list of unique values in a list or range.

UNIQUE Function in Excel

**UNIQUE Function in Excel**

SORT Function in Excel

The SORT function sorts the contents of a range or array.

In the SORT screenshot below, we are sorting the range by the second column in ascending order.

1. Range 2. Sort priority - 2nd column in the example 3. Ascenting - 1

SORT Function in Excel

**SORT Function in Excel**

COUNT and COUNTA Functions in Excel

The COUNT and COUNTA functions are very similar.  The COUNT function counts the number of cells that contain numbers.COUNT will not include cells that contain text. COUNTA will count cells that contain any data, including errors. COUNTA will not count blanks.

COUNT and COUNTA Functions

**COUNT and COUNTA Functions**

TEXT Function

The TEXT Function converts numbers to text and has two required arguments. Use the TEXT function when you have zip codes and the leading zero is dropped with a number.

TEXT Function in Excel

**TEXT Function in Excel**