Reputation: 123
This formula:
=FILTER(SORT(UNIQUE(flatten(C3:H14));1;1); SORT(UNIQUE(flatten(C3:H14));1;1)<>"")
Merges all values in C3:H14 into a single column then removes duplicates and sorts the result in ascending order.
It is possible to compare the result with a second list and then leave only the values that never repeat?
Like, First Range
A B
Orange Grapes
Apple Carrot
Flattened Range (A + B)
C
Apple
Carrot
Grapes
Orange
Comparison range
D
Apple
Banana
Carrot
Grapes
Orange
Peach
So the final result will be (D - C):
E
Banana
Peach
Although using UNIQUE function is possible to remove duplicates while keeping one copy of each value.
How can we approach this situation to leave only values that never repeat? Also, it would be possible to use a Named Range as comparison range? Thanks for the attention.
Upvotes: 1
Views: 204
Reputation: 10573
You mention
So the final result will be (D - C)
And further down
How can we approach this situation to leave only values that never repeat?
Please use following formula
=FILTER(B2:B,ISERROR(MATCH(B2:B,A2:A,0)))
As for the named range please see more here
EDIT (copying @Mateo's great comment)
To provide a bit more of information on how this function works.
#N/A
which are caught by the function ISERROR
.B
with these values that did not match and you return them.Functions used:
Upvotes: 4