Ukraine flag War in Ukraine. Here's what Ablebits is doing to make sure our team and projects are safe.

How to Trim Spaces in Excel

With Text Toolkit for Microsoft Excel

With the Text Toolkit for Excel, you can easily trim excess spaces and leading zeros in the selected cells. In this manual, find out how to use the Trim Spaces utility.

  1. To run the tool in Excel, go to the Home tab and click the Text Toolkit icon:
    This is the Text Toolkit icon.
  2. Select Trim Spaces:
    Select Trim Spaces.
  3. You will see the Trim Spaces pane. Select your options and click the Trim button:
    The Trim Spaces pane.
  1. Select the range of cells where you want to trim unwanted spaces or zeros.
  2. Tick this box to get rid of all zeros before cell values in the selected range.
  3. Pick Trim leading/trailing spaces to remove excess spaces before or after cell values.
  4. Select Trim spaces between words to 1 in case your text cells may have extra spaces between words and you want to delete these spaces.
  5. Choose this option to remove non-breaking spaces.
  6. If there is a check mark next to Don't change cells with formulas, the add-in won't process cells that contain formulas.
  7. With the Create a backup copy option selected, the Restore button is added and a hidden copy of your sheet will be saved. After the tool has processed your data, the Restore button gets enabled. You can click it and return to the previous version of the processed sheet if necessary.
    Here's the Restore button.

    Tip. To see available backup copies, right-click any sheet tab in your Excel workbook and choose "Unhide".

    Unhide any of the backup sheets that you can see in the list.

    Note. You can delete hidden backups with the Remove all backup sheets option in the More menu. To see it, click the three dots in the lower-right corner of the Text Toolkit pane:

    Find the Remove all backup sheets option in the More menu.