Aug 28 2021 08:05 AM
Aug 28 2021 08:17 AM
As variant that could be
=LET(
ra, ROWS(Table1),
rb, ROWS(Table2),
k, SEQUENCE(ra+rb),
SORT( UNIQUE( IF(k<=ra, INDEX(Table1[Column1], k), INDEX(Table2[Column2], k-ra))))
)
which returns
Aug 28 2021 08:43 AM
Aug 28 2021 08:53 AM
Aug 28 2021 09:20 AM
That is not CSE formula, that is regular formula which returns the spill automatically updated if you add new data into structured tables (Table1 and Table2). If I add some data into Table1
and same into Table2
resulting spill will be
Aug 28 2021 09:24 AM
Aug 28 2021 09:27 AM
Aug 28 2021 09:30 AM
Aug 28 2021 09:31 AM
@Sergei Baklan's solution is perfect for your needs, as one might expect. I redid the solution from scratch and there are barely any differences
= LET(
n₁, ROWS(Column1),
n₂, ROWS(Column2),
k, SEQUENCE(n₁+n₂),
vstack, IF(k<=n₁, Column1, INDEX(Column2, k-n₁)),
SORT(UNIQUE(vstack))
)
If you are using anything but Excel 365, get rid of it and replace it by 365. If you are using 365, make sure that you allow the formula to spill and do not use CSE.
Aug 28 2021 09:36 AM
Aug 28 2021 12:29 PM
This takes me back to stuff I was thankful to see the back of, hopefully forever!
First, defining n₁, n₂ and 'combined'
= ROWS(Table1)
= ROWS(Table2)
= IF(k<=n₁,
Column1,
IF(k<=n₁+n₂,
INDEX(Column2, k-n₁),
""
)
)
one the uses MATCH to identify the first occurrence and SMALL to compact the list
= IFERROR(
INDEX(
combined,
SMALL(
IF( MATCH(combined, combined, 0) = k, k, "" ),
@k
)
),
"" )
I have also shown a PowerQuery solution that works with Office 2010 but requires an additional software download.
let
Source = Table.Combine({Table1, Table2}),
Distinct = Table.Distinct(Source),
Text = Table.TransformColumnTypes(Distinct,{{"Data", type text}})
in
Text
All of which serves to reinforce my dislike of conventional spreadsheets!