ASAP Utilities for Excel - Remove Leading and Trailing Spaces

Remove Leading and Trailing Spaces

ASAP Utilities › Text  ›  10. Remove Leading and Trailing Spaces

This tool removes all spaces from the beginning and end of the values in your selected cells, while spaces between words or characters are left unchanged.

For example, a cell containing "Excel" will be changed to "Excel".
Or "1000 AP Amsterdam" stays "1000 AP Amsterdam", keeping the two spaces between the ZIP code and city name.

Compared to Excel's TRIM() function, this tool preserves double or multiple spaces between words or characters, which is helpful when spacing has meaning, such as in addresses, codes, or formatted text. It also removes leading and trailing nonbreaking spaces (character 160,  ), which sometimes appear in data copied from websites or exported from other systems and are not removed by TRIM().

As an added bonus, this tool also helps fix cells that contain a zero-length string. Microsoft uses this term for values that look blank but actually contain invisible content, such as a single apostrophe or the result of a formula like "" that was pasted into the cell as a value. After cleanup, Excel will recognize these cells as truly empty.

Cells that contain only spaces (including nonbreaking spaces) will be turned into empty cells.
Cells with formulas are left unchanged.

This is especially useful when cleaning up imported data, fixing lookup mismatches (VLOOKUP, XLOOKUP), or preparing consistent text values for sorting and filtering.

By default, you can launch this tool using the Control+Alt+Shift+T shortcut.

Starting this tool

Specify a Keyboard Shortcut: ASAP Utilities  › My Tools & Shortcuts › Manage My Tools & Shortcuts...

Additional keywords to help you find this tool:
Remove leading spaces, Remove trailing spaces, Trim spaces in Excel, Nonbreaking space removal, Fix blank cells in Excel, Cells not recognized as empty, Excel trim function alternative, Remove unwanted whitespace in Excel, Fix lookup errors due to spaces, Excel VLOOKUP not working because of spaces, Delete extra spaces before or after text, Clean data with whitespace, Remove space at beginning and end, Clean cells for sorting and filtering, Excel cells look empty but aren't, Trim nonbreaking space character 160, Fix Excel cells with invisible characters, Remove unnecessary space from cell

Designed by Excel users for Excel users.
Practical tools many Excel users wish were built into Excel.

Save Time in Excel. The Easy Way.

ASAP Utilities helps you save time and do what Excel alone can't.

You can get started right away. No training needed.

Most users start with a few tools. Many end up using ASAP Utilities daily.

Used by teams in 28,500+ organizations.

Get Started with ASAP Utilities

Start saving time in Excel with practical tools you can use right away.

  • No sign-up required.

  • Free 90-day trial