Home > Software engineering >  Compare two columns in same sheet f excel and return unmatched records
Compare two columns in same sheet f excel and return unmatched records

Time:07-02

I have an excel sheet with Gui-id in two column. I see GUID's does not get sorted in order(asc/desc).How can we Compare two columns in same sheet of excel and return unmatched records.

Example

name                                         name
fffb91b7-f5e5-4d81-af52-ff8d3887624c    fde0137b-7918-4942-bacf-db3358e92e7f
fffb7e2a-8c44-4350-a1fd-5f0879b2c5ad    fffb7e2a-8c44-4350-a1fd-5f0879b2c5ad 
ffec4706-cc0a-4cd3-89a8-2b1c0475600c    f83355f6-191a-4f29-b951-77ef5148f64a
ffe5f849-b5ff-4042-842b-592ed9f134fe    ffe5f849-b5ff-4042-842b-592ed9f134fe 

Unmatched records Output

fffb91b7-f5e5-4d81-af52-ff8d3887624c
ffe5f849-b5ff-4042-842b-592ed9f134fe
fde0137b-7918-4942-bacf-db3358e92e7f
f83355f6-191a-4f29-b951-77ef5148f64a

CodePudding user response:

Try FILTERXML() in this way.

=FILTERXML("<t><s>"&TEXTJOIN("</s><s>",TRUE,A2:B5)&"</s></t>","//s[not(following::*=. or preceding::*=.)]")

More about enter image description here

  • Related