Forum Discussion
EPond2130
Oct 24, 2023Copper Contributor
Identify duplicate names in a database list.
Hi All! I need to omit duplicate names in a database. I see that I could use the unique function but am not sure how to apply it to the list. This is probably Excel for Beginners, but I canʻt figure ...
PeterBartholomew1
Oct 24, 2023Silver Contributor
A formula that amused me is
= LET(
distinct, UNIQUE(list),
unique, UNIQUE(list,,TRUE),
stacked, VSTACK(distinct, unique),
duplicates, UNIQUE(stacked,,TRUE),
duplicates
)
The variable 'distinct' holds a single copy of each record whereas 'unique' contains only the non-duplicates. Stacking them produces a list in which the original unique records now appear twice.
Hence 'duplicates' is a lists of records that were duplicated in the original list.