#34 — Remove Duplicates And Compute Intersection

#34-—-remove-duplicates-and-compute-intersection

Problem description & analysis:

An Excel table has two columns of numbers, and there are duplicates in a column:

original table

Task: First remove duplicates from the columns and then compute their intersection:

desired table

Solution:

Use SPL XLL to do this:

=spl("=[?1,?2].isect(~.group().select(~.len()==1).conj())",A1:A5,B1:B4)

As shown in the picture below:

result table with code entered

Explanation:

isect()computes the intersection. group() groups data but does not perform aggregation. select() performs filtering operation; ~ is the current member.

Total
0
Shares
Leave a Reply

Your email address will not be published. Required fields are marked *

Previous Post
jpg-to-jxl:-a-guide-to-converting-modern-image-formats

JPG to JXL: A Guide to Converting Modern Image Formats

Next Post
day-24-of-100-days-of-code

Day 24 of 100 Days of Code

Related Posts