Find difference between two strings
In the Excel table below, both column A and column B contain semicolon-separated strings:
A |
B |
|
1 |
Tom;Hema |
Tom |
2 |
Tom;Hema;Alice;Liam |
Tom;Alice |
3 |
Tom;Hema |
Tom;Hema |
Task: Find difference between column A and column B, which consists of items that are contained in column A but not contained column B, and separate the result with the semicolon:
D |
|
1 |
Hema |
2 |
Hema;Liam |
3 |
Use SPL XLL to get this done:
=spl("=?.((~1.split($[;]) \ ~2.split($[;])).concat($[;]))",A1:B3)
~1 represents the first child member of the current member (row); \ is the operator for computing the difference; $[] represents a string.
SPL Official Website 👉 https://www.scudata.com
SPL Feedback and Help 👉 https://www.reddit.com/r/esProc_Desktop/
SPL Learning Material 👉 https://c.scudata.com
Discord 👉 https://discord.gg/cFTcUNs7
Youtube 👉 https://www.youtube.com/@esProcDesktop
Linkedin Group 👉 https://www.linkedin.com/groups/14419406/