Unique distinct values from multiple columns using array formula
Question: I have cell values spanning over several columns and I want to create a unique list from that range. How?
Answer:
Edit: Updated blog article after Eero´s valuable comment.
Unique distinct text values from range tbl_text, array formula in B13:
=INDEX(tbl_text, MIN(IF(COUNTIF($B$12:B12, tbl_text)=0, ROW(tbl_text)-MIN(ROW(tbl_text))+1)), MATCH(0, COUNTIF($B$12:B12, INDEX(tbl_text, MIN(IF(COUNTIF($B$12:B12, tbl_text)=0, ROW(tbl_text)-MIN(ROW(tbl_text))+1)), , 1)), 0), 1) + CTRL + SHIFT + ENTER copied down as far as necessary.
Unique distinct num values from range tbl_num, array formula in D13:
=LARGE(IF(COUNTIF($D$12:D12, tbl_num)=0, tbl_num, ""), 1) + CTRL + SHIFT + ENTER copied down as far as necessary
Download excel sample file for this article.
Unique distinct values from multiple columns using array formulas.xls
(Excel 97-2003 Workbook *.xls)
Functions in this article
ROW(reference) Returns the rownumber of a reference
ROWS(array) returns the number of rows in a reference or an array
COUNTIF(range,criteria)
Counts the number of cells within a range that meet the given condition
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
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
LARGE(array,k) returns the k-th largest row number in this data set.
MIN(number1,[number2])
Returns the smallest number in a set of values. Ignores logical values and text
This blog article is one out of thirteen articles on the same subject "unique".
- How to extract a unique distinct list from a column in excel
- Extract a unique distinct list from two columns using excel 2007 array formula
- Extract a unique distinct list from three columns in excel
- Extract distinct unique sorted year and month list from a date series in excel
- Create a unique distinct list from a date range in excel
- Unique values from multiple columns using array formulas
- Extract a unique distinct list sorted from A-Z from range in excel
- Sort a range by occurence using array formula in excel
- Filter unique distinct values from two ranges combined in excel 2007
- Create a unique list and sort by occurrances from large to small
- Unique list to be created from a column where an adjacent column has text cell values
- Create unique list from column where an adjacent column meets criteria
- How to create a unique distinct list where other columns meet two criteria
External resources:
Identifying Unique Values In An Array Or Range (VBA function)
Related posts:
- Extract unique values from a range using array formula in excel
- Extract a unique distinct list from two columns using excel 2007 array formula
- Unique distinct list from a column sorted A to Z using array formula in excel
- Comparing two columns and sum unique values using array formula in excel
- Filter unique distinct text values using “begins with” criterion in a range using array formula in excel
- Filter unique distinct list sorted based on sum of adjacent values using array formula in excel
- Filter unique values from a range using array formula in excel
- Extract a unique distinct list from three columns in excel
- How to create a unique distinct list where other columns meet two criteria
- Extract largest values from two columns using array formula in excel




June 13th, 2009 at 2:26 pm
A slightly different approach to extract unique items from a N*M table (named as "tbl" in the formula).
So type say "Unique items from the table" in A1 and enter the following formula as an array into A2 and copy it down as far as necessary.(it is supposed column A to be free)
=INDEX(tbl,MIN(IF(COUNTIF($A$1:A1,tbl)=0,ROW(tbl)-MIN(ROW(tbl))
+1)),MATCH(0,COUNTIF($A$1:A1,INDEX(tbl,MIN(IF(COUNTIF($A$1:A1,tbl)=0,ROW(tbl)-MIN
(ROW(tbl))+1)),,1)),0),1)
June 23rd, 2009 at 9:55 pm
Thank you! Your formula is working perfectly! No need for a "helper" column!