DEV Community

Cover image for #43 - Find the Difference Between Two Strings
Judith-Excel-Sharing
Judith-Excel-Sharing

Posted on

#43 - Find the Difference Between Two Strings

Problem description & analysis:

In the Excel table below, both column A and column B contain semicolon-separated strings:

original table

Task: Find the difference between column A and column B, which consists of items that are contained in column A but not contained in column B, and separate the result with the semicolon:

desired table

Solution:

Use SPL XLL to get this done:



=spl("=?.((~1.split($[;]) \ ~2.split($[;])).concat($[;]))",A1:B3)


Enter fullscreen mode Exit fullscreen mode

As shown in the picture below:

result table with code entered

Explanation:

~1 represents the first child member of the current member (row); \ is the operator for computing the difference; $[] represents a string.

Top comments (2)

Collapse
 
judith677 profile image
Judith-Excel-Sharing

Feel free to download esProc Desktop and improve your productivity of data processing ⬇️

🚀SPL download address: scudata.com/download-Desktop

📊Plugin Installation Method: c.scudata.com/article/1652061135502

🚀References to other rich Excel operation cases: c.raqsoft.com/article/1651916536524

📊SPL Programming (YouTube FREE courses): youtube.com/playlist?list=PLQeR-Ih...

Some comments may only be visible to logged-in visitors. Sign in to view all comments.