How to split string that the words isn't split and result string is max 30 chars ?
input cell = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt' output cell = 'Lorem ipsum dolor sit amet'
I need only formula, not VBA.
Simpler array formula:
=SUBSTITUTE(TRIM(LEFT(A1,MAX(IF(MID(A1,ROW($1:$30),1)=" ",ROW($1:$30))))),",","")
Array formula after editing is confirmed by pressing ctrl + shift + enter
ctrl
shift
enter
2.1m questions
2.1m answers
60 comments
57.0k users