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

How to alphabetically sort coma separated cells Google Sheets?

Please see below the project I’m trying to solve and for which I need your help.

(E) Choice-not sorted (F) Choice-sorted
Banana, Orange, Apple Apple, Banana, Orange
Strawberry, Orange Orange, Strawberry
Coffee, Apple, Strawberry, Lime, Shoes Apple, Coffee, Lime, Shoes, Strawberry
Etc. Etc.

How to get F from E?

I found some solutions in stackoverflow but for some reasons, I didn’t manage to make them work.

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

Thank you very much!

>Solution :

pivot it:

=ARRAYFORMULA(IFNA(VLOOKUP(ROW(A1:A5)&"", REGEXREPLACE(TRIM(SPLIT(FLATTEN(QUERY(
 QUERY(TRIM(SPLIT(FLATTEN(ROW(A1:A5)&"♦♣"&SPLIT(A1:A5, ",")&","), "♣")), 
 "select max(Col2) where Col2 <>',' group by Col2 pivot Col1"),,9^9)), "♦")), ",$", ), 2, )))

enter image description here

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