It may not need a macro; if you have a version of Excel which has the TextJoin worksheet function you could have in G2:
=TEXTJOIN(" ",TRUE,A2:E4)
or:
=TEXTJOIN(" ",FALSE,A2:E4)
depending upon how you want to treat empty cells.
Then if you want to lose the formula you can copy, paste-special, Values afterwards.
|