In U1:
=BYCOL(A1:S1,LAMBDA(c,TEXTJOIN(CHAR(10),,SORT(TEXTSPLIT(c,," ")))))
Set cells to Wrap Text and Align Top.
In the SAME cell would require VBA - shall I move the thread for you?
EDIT: VBA won't work online - you'd need to look at Office Scripts, but we'd still need to move the thread.
Bookmarks