Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Comparing two cells to mark if contents are actually different or just re-arranged?

Column A Column B Column C
192-914-231 914-231-192 FALSE
192-914-231 914-187-231 TRUE

I have two columns in excel containing digits with hyphens between them. I need to compare these columns to see whether there is a difference in the numbers or if they are just rearranged. I would like this to return as FALSE- the number are just rearranged or TRUE- there is a difference in digits.

Above, row 1 is false since the 3-digit clusters just switched placed. Row 2 is True even though the places switched there was also a change in value. Could I get some guidance on a formula that’d be able to put this together?

I am currently doing this by eye, comparing the length and exact of the columns to help identify them, but haven’t come up with a good way to do this via formula.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

As I have commented above, here is an alternative using TEXTSPLIT( ) & SORT( )

enter image description here


=OR(SORT(TEXTSPLIT(A2,,"-"))<>SORT(TEXTSPLIT(B2,,"-")))

Also, I will like to say thanks to two special peoples for whom I have learnt lot from this forum : JvdV Sir & Scott Craner Sir, lot of support and knowledge I have gathered from them .

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading