I have 2 values in 2 different cells as below,
Cell1 = a,b,c,d,e,f
and
Cell2 = f,a,d,c,b,e
Both the cells may contain same vales but not in exact order.
How Can I compare both in excel sheet or a google sheet and get to know if both the cells have same values irrespective of the order of the values.
I tried some methods but they are not working.
Any help will be greatly appreciated.
Thank you!
CodePudding user response:
What you could do is split them, transpose, sort then join again before comparing
Formula:
=join(",", sort(transpose(split(A1, ","))))=join(",", sort(transpose(split(B1, ","))))
Output:
CodePudding user response:
Try this excel function,
In D1
, formula copied down :
=SUMPRODUCT(CODE(MID(A1,ROW($1:$99),1)&0))=SUMPRODUCT(CODE(MID(B1,ROW($1:$99),1)&0))