I have to sort the comma separated text in each row in a column. Note that I´m not sorting the rows, but text within each row only. At present, I´m using the formula to do this in a separate column. Instead, I want to get the same result on the original column itself.
For example, consider the table below. Column J has comma separated text. I´m able to sort the text in each row as seen in column K. I want to get the same result in column J.
For example, consider the table below. Column J has comma separated text. I´m able to sort the text in each row as seen in column K. I want to get the same result in column J.
excel problems.xlsx | ||||
---|---|---|---|---|
J | K | |||
3 | dd,aa,mm | aa,dd,mm | ||
4 | bbb | bbb | ||
5 | kk,tt,cc,2e | 2e,cc,kk,tt | ||
6 | p,yu | p,yu | ||
7 | ij,gt,fx,w,m6t | fx,gt,ij,m6t,w | ||
8 | h | h | ||
9 | df,ao | ao,df | ||
10 | pmk,q,88,un,zt | 88,pmk,q,un,zt | ||
11 | ec,bl | bl,ec | ||
12 | 72,hp,fv | 72,fv,hp | ||
Sheet8 |
Cell Formulas | ||
---|---|---|
Range | Formula | |
K3:K12 | K3 | =DROP(REDUCE("",$J$3:$J$12,LAMBDA(x,y,VSTACK(x,TEXTJOIN(",",TRUE,SORT(TOCOL(TEXTSPLIT(y,","))))))),1) |
Dynamic array formulas. |