1

Is there any way in Google Sheets to automatically change cells from the current format to intended format like in this screenshot:

Screenshot

player0
  • 124,011
  • 12
  • 67
  • 124
artilexx
  • 25
  • 4

1 Answers1

1
=ARRAYFORMULA(REGEXREPLACE(TRIM(SPLIT(TRANSPOSE(SPLIT(
 CONCATENATE(TRANSPOSE(QUERY({"♦"&A1:A&"♠", B1:B&", "}, 
 "select max(Col2) where Col2 is not null group by Col2 pivot Col1", 0))), 
 "♦")), "♠")), ",$", ))

0

player0
  • 124,011
  • 12
  • 67
  • 124
  • 1
    Thanks! Works perfectly :) – artilexx Sep 02 '19 at 23:17
  • @player0 i have 6k rows. This gives me error `Text result of CONCATENATE is longer than the limit of 50000 characters.`. Is there a way to overcome this limit and modify this formula to handle large data? – sifar Dec 07 '20 at 16:23
  • here's my [post](https://stackoverflow.com/questions/65169246/combine-duplicate-rows-in-column-as-comma-separated-values-google-query/65182833?noredirect=1#comment115236664_65182833). – sifar Dec 07 '20 at 16:24
  • @sifar it depends on your dataset... https://stackoverflow.com/a/65187342/5632629 – player0 Dec 07 '20 at 18:28