Excel Study · Module 5: Text functions
Class 41TRIM: extra spaces gone
Intermediate2:06 videoFree
Names pasted from an email often carry extra spaces: before the name, between the words, or after it, where you cannot see them. LEN counts them for you. TRIM removes every space except single spaces between words: =TRIM(A2).
Try this AI prompt
Works in ChatGPT, Gemini, Copilot or Claude.
In Excel, A2 has a name pasted from an email, with extra spaces in it. Write a formula for C7 that gives the name from A2 with the extra spaces removed.
The answer that works
✓ checked in Excel=TRIM(A2)
AI can get Excel wrong. Paste its answer into Excel and test it before you trust it.