## Create unique distinct list sorted based on text length using array formula

*Article last updated on August 15, 2017*

**Array formula in B2:**

copied down as far as needed.

**Named ranges**

List (A2:A19)

What is named ranges?

**How to customize the formula to your excel spreadsheet**

Change the named range. If your unique list starts at F3, change B1:$B$1 in the above array formula to $F$2:F2

Download excel sample file for this tutorial.

Sort text values by length.xls

(Excel 97-2003 Workbook *.xls)

**Functions in this article:**

**MATCH(**lookup_value;lookup_array; [match_type]

Returns the relative position of an item in an array that matches a specified value

**INDEX(**array,row_num,[column_num]**)**

Returns a value or reference of the cell at the intersection of a particular row and column, in a given range

**IF(**logical_test;[value_if:true];[value_if_false]**)
**Checks whether a condition is met, and returns one value if TRUE, and another value if FALSE

**ROW(**reference**)** returns the rownumber of a reference

**COUNTIF(**range,criteria**)**

Counts the number of cells within a range that meet the given condition

**MAX(**number1,[number2],**)
**Returns the largest value in a set of values. Ignores logical values and text.

**NOT(**logical**)**

Changes FALSE to TRUE or TRUE to FALSE

**LEN(**text**)**

Returns the number of characters in a text string

5 easy ways to VLOOKUP and return multiple values

This post explains how to lookup a value and return multiple values. No array formula required.

Lookup and return multiple values concatenated into one cell

This article demonstrates how to find a value in a column and concatenate corresponding values on the same row. The […]

Question: How do I create a chart that dynamically adds the values, as i type them on the worksheet? Answer: […]

### Leave a Reply

### How to comment

**How to add a formula to your comment**

<code>Insert your formula here.</code>

**Convert less than and larger than signs**

Use html character entities instead of less than and larger than signs.

< becomes < and > becomes >

**How to add VBA code to your comment**

[vb 1="vbnet" language=","]

Put your VBA code here.

[/vb]

**How to add a picture to your comment:**

Upload picture to postimage.org or imgur

Use the img tag, like this: <img src="Insert pic link here">

**Contact Oscar**

You can contact me through this contact form