Create unique distinct list sorted based on text length using array formula in excel
Array formula in B2:
=IF(ROWS(B2:$B$2)>SUM(1/COUNTIF(List, List)), "", INDEX(List, MATCH(MAX((LEN(List)&","&ROW(List))*NOT(COUNTIF(B1:$B$1, List))), (LEN(List)&","&ROW(List))*NOT(COUNTIF(B1:$B$1, List)), 0))) + CTRL + SHIFT + ENTER 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
Related posts:
- Filter unique distinct list sorted based on sum of adjacent values using array formula in excel
- Create a drop down list containing only unique distinct alphabetically sorted text values using excel array formula
- Sort text values by length using array formula in excel
- Filter a column and create a new unique list sorted from A to Z using array formula in excel
- Unique distinct list sorted based on occurrance in a column in excel
- Unique distinct list from a column sorted A to Z using array formula in excel
- Create a unique distinct text list from a range containing both numerical and text values in excel
- Filter unique distinct text values using “begins with” criterion in a range using array formula in excel
- Create a unique distinct alphabetically sorted list, extracted from a column in excel
- Identify largest text value in a column using array formula in excel



Leave a Reply