Question: How do I filter unique values from two ranges combined using array formulas?

Answer:

filter-unique-values-from-two-ranges

Array formula in B13:

=INDEX(_tbl1, MIN(IF(COUNTIF($B$12:B12, _tbl1)=0, ROW(_tbl1)-MIN(ROW(_tbl1))+1)), MATCH(0, COUNTIF($B$12:B12, INDEX(_tbl1, MIN(IF(COUNTIF($B$12:B12, _tbl1)=0, ROW(_tbl1)-MIN(ROW(_tbl1))+1)), , 1)), 0), 1) + CTRL + SHIFT + ENTER

Copy cell B13 and paste it down as far as necessary.

Recommended reading:

Extract a unique distinct list sorted from A-Z from range in excel

Inspired from a comment in this article Unique values from multiple columns using array formulas I have now created this […]

Comments(3) Filed in category: Excel, Unique distinct values

Array formula in D13:

=INDEX(_tbl2, MIN(IF(COUNTIF($D$12:D12, _tbl2)+COUNTIF($B$13:$B$22, _tbl2)=0, ROW(_tbl2)-MIN(ROW(_tbl2))+1)), MATCH(0, COUNTIF($D$12:D12, INDEX(_tbl2, MIN(IF(COUNTIF($D$12:D12, _tbl2)+COUNTIF($B$13:$B$22, _tbl2)=0, ROW(_tbl2)-MIN(ROW(_tbl2))+1)), , 1))+COUNTIF($B$13:$B$22, INDEX(_tbl2, MIN(IF(COUNTIF($D$12:D12, _tbl2)+COUNTIF($B$13:$B$22, _tbl2)=0, ROW(_tbl2)-MIN(ROW(_tbl2))+1)), , 1)), 0), 1) + CTRL + SHIFT + ENTER

Copy cell D13 and paste it down as far as necessary.

The array formula in D13 and below automatically removes common unique distinct values between _tbl1 and _tbl2.

Recommended reading:

Extract a unique distinct list sorted alphabetically removing blanks from a range

This is an answer to a question in this blog post: Extract a unique distinct list sorted from A-Z from […]

Comments(21) Filed in category: Excel

Named ranges
_tbl1 (B2:E5)
_tbl2 (B7:E10)
What is named ranges?

Recommended reading:

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. […]

Comments(23) Filed in category: Excel, Unique distinct values

Download excel example file.
filter-unique-distinct-values-from-two-ranges.xlsx
(Excel 2007 Workbook *.xlsx)

Recommended reading:

Extract duplicates from a range using excel array formula

Overview Inspired by a comment in this post Unique values from multiple columns using array formulas, I  created an array […]

Comments(0) Filed in category: Duplicate values, Excel

Functions in this article:

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

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

SMALL(array,k) Returns the k-th smallest row number in this data set.

ROWS(array) returns the number of rows in a reference or an array

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

COUNTIF(range,criteria)
Counts the number of cells within a range that meet the given condition

MIN(number1,[number2])
Returns the smallest number in a set of values. Ignores logical values and text

Recommended reading:

Sort a range by occurence using array formula in excel

Learn how to sort cell values by frequency.

Comments(4) Filed in category: Excel, Sort values