A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
Hi,
Welcome to Microsoft Community!
To remove extra spaces from a cell in Excel, you can use the TRIM function, which removes all extra spaces from text except for single spaces between words.
- Suppose your text is in cell A1.
- In another cell, enter this formula: =TRIM(A1)
- Press Enter.
- Copy the result and use Paste Special > Values to replace the original if needed.
In case that TRIM doesn't work (e.g., due to non-breaking spaces), kindly use: =TRIM(CLEAN(SUBSTITUTE(A1,CHAR(160)," ")))
Whereas:
- CHAR(160) is a non-breaking space.
- CLEAN removes non-printable characters
I hope you find the information above useful. Please let me know how it works. I'll be looking forward to your response.
Best regards,
Phoebe-N - MSFT | Microsoft Community Support Specialist