Is it possible for the new function UNIQUE
to be used across various columns & have the output spill into a single column?
Desired output is UNIQUE
values in one single column based on all of the values present in Columns: A, B, & C
(duplicates in red)
New Answer:
Ms365's new array shaping functions will be useful:
=UNIQUE(TOCOL(A2:C7,3,1))
TOCOL()
would return a vector of all values other than error or empty (3) values per column (1).
Old Answer:
Using Microsoft365 with access to LET()
, you could use:
Formula in E2
:
=LET(X,A2:C7,Y,SEQUENCE(ROWS(X)*COLUMNS(X)),Z,INDEX(IF(X="","",X),1+MOD(Y,ROWS(X)),ROUNDUP(Y/ROWS(X),0)),SORT(UNIQUE(FILTER(Z,Z<>""))))
This way, the formula becomes easily re-usable since the only parameter we have to change is the reference to "X".
For what it's worth, it could also be done through PowerQuery A.K.A. Get&Transform, available from Excel2013 or a free add-in for Excel 2010.
The above will take care of empty values too. Now:
Resulting table:
M-Code:
let
Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
#"Changed Type" = Table.TransformColumnTypes(Source,{{"A Values", Int64.Type}, {"B Values", Int64.Type}, {"C Values", Int64.Type}}),
#"Transposed Table" = Table.Transpose(#"Changed Type"),
#"Unpivoted Columns" = Table.UnpivotOtherColumns(#"Transposed Table", {}, "Attribute", "Value"),
#"Removed Columns" = Table.RemoveColumns(#"Unpivoted Columns",{"Attribute"}),
#"Sorted Rows" = Table.Sort(#"Removed Columns",{{"Value", Order.Ascending}}),
#"Removed Duplicates" = Table.Distinct(#"Sorted Rows")
in
#"Removed Duplicates"