Forum Discussion
TheWeetek
Jul 27, 2023Copper Contributor
How to delete duplicates in two columns
Hey, may you suggest, how to delete duplicates so, there will stay just number 4 in A column? thanks
Patrick2788
Jul 30, 2023Silver Contributor
There are a few different ways to do this depending on if you go the text-manipulation route or not. Ideally, BYROW would be able to handle this, but it's limited to returning scalars.
This is my solution:
=LET(
rows, ROWS(data),
columns, COLUMNS(data),
shuffle, LAMBDA(r, c, SMALL(INDEX(data, r, {1, 2}), c)),
ordered, MAKEARRAY(rows, columns, shuffle),
UNIQUE(ordered)
)