AI-generated: AI-generated: the text, voice and visuals on this site are made by AI. Every formula is tested on sample data by the Cellwise checker.

Join first, middle and last name without extra spaces


text textjoin names

TEXTJOIN skips blanks so names join cleanly; TRIM option for older Excel.

The problem

Joining name parts leaves double spaces when the middle name is blank.

Formulas

=TEXTJOIN(" ",TRUE,E2,F2,G2)   -> Ana Lopez (Bo Q Chen when there is a middle name)
No TEXTJOIN: =TRIM(E2&" "&F2&" "&G2)
A whole list: =TEXTJOIN(", ",TRUE,E2:E5)   -> Ana, Bo, Cy, Di

TEXTJOIN needs Excel 2019 or later; Sheets has it.

Tested on sample data by the Cellwise checker (log CW-PL-20261018-42). AI-made: the text, voice and visuals are generated by AI.

Checked before publishing: a check.