3 ways to remove spaces between words / numbers in Excel cells

3 quick ways to remove extra spaces between words or delete all spaces from Excel cells. You can use trim formula, Excel Find & replace or special Excel add-in to clean up cells' content.

When you paste data from an external source to an Excel spreadsheet (plain text reports, numbers from web pages, etc.), you are likely to get extra spaces along with important data. There can be leading and trailing spaces, several blanks between words and thousand separators for numbers.

Consequently, your table looks disorderly and becomes difficult to use. It may be a challenge to find a customer in the Name column since you search for "John Doe" which has no excess spaces between the names while the way it looks in your table is "John Doe". Or numbers can't be summed up, and again extra blanks are the ones to blame.

In this article you'll find how to clean up your data.

Trim blanks between words to 1, remove trailing / leading spaces

For example, you have a table with 2 columns. In the column Name, the first cell contains "John Doe" written correctly without excess spaces. All other cells have extra blanks between the first and the last names. At the same time these cells have irrelevant blanks before and after the full names known as leading and trailing spaces. The second column is called Length and shows the number of symbols in each name: Excel table with leading and trailing spaces, spaces between words

Use the Trim formula to remove extra spaces

Excel has the Trim formula to use for deleting extra spaces from text. Below you can find the steps showing how to use this option:

  1. Add the helper column to the end of your data. You can name it "Trim".
  2. In the first cell of the helper column (C2), enter the formula to trim excess spaces =TRIM(A2) Excel trim formula delete spaces
  3. Copy the formula across the other cells in the column. Feel free to use some tips from Enter the same formula into all selected cells at a time.
  4. Replace the original column with the one that has the cleaned data. Select all cells in the helper column and press Ctrl + C to copy data to clipboard.

    Now pick the first cell in the original column and press Shift + F10 or the menu button  menu keyboard button. Then just press V. Replace the original column with the one that has the extra  spaces removed

  5. Remove the helper column.

    That's it! We deleted all excess blanks with the help of the formula trim(). Unfortunately, it's a bit time-consuming, especially if your spreadsheet is rather big. Remove spaces between words to 1, remove leading and trailing spaces

    Note. If after using the formula you still see extra spaces (the last cell on the screenshot), please have a look at If the TRIM function doesn't work.

Using Find & Replace to remove extra spaces between words

This option needs fewer steps, but allows only deleting excess spaces between words. Leading and trailing spaces will also be trimmed to 1, but will not be removed.

  1. Select one or several columns with the data to delete spaces between words.
  2. Press Ctrl + H to get the "Find and Replace" dialog box.
  3. Press the Space bar twice in the Find What field and once in Replace With
  4. Click on the "Replace all" button, and then press Ok to close Excel confirmation dialog. Use Excel Find & Replace to remove extra spaces between words
  5. Repeat step 4 until you see the message "We couldn't find anything to replace." :)

3 clicks to neat data with Trim Spaces tool

If you often import data to Excel from external sources and spend much time polishing up your tables, the Trim Spaces tool will clean data imported from the web or any other external source. It removes leading and trailing spaces, excess blanks between words, non-breaking spaces, and line breaks.

To remove all extra spaces in your worksheet, including excess paces between words, this is what you need to do:

  1. Download and install a trial version of Ultimate Suite for Excel.
  2. Select the range in your table where you want to remove excess spaces. For new tables, I usually press Ctrl + A to process all columns in a go.
  3. Go to Ablebits Data tab and click on the Trim Spaces icon. Click on the Trim Spaces icon to run the tool.
  4. The add-in's pane will open on the left side of your worksheet. Just select the needed checkboxes, click the Trim button and enjoy your perfectly cleaned table. All extra spaces are trimmed.

Isn't it faster than with the two previous tips? If you always deal with data processing, this tool will save you hours of precious time.

Remove all spaces between numbers

Suppose, you have a workbook with numbers where the digits (thousands, millions, billions) are separated with spaces. Thus Excel sees numbers as text and no math operation can be performed. Excel cells with numbers where the digits are separated with spaces

The easiest way to get rid of excess spaces is using the standard Excel Find & Replace option:

  • Press Ctrl + Space to select all cells in a column.
  • Press Ctrl + H to open the "Find & Replace" dialog box.
  • Press Space bar in the Find What field and make sure the "Replace with" field is empty.
  • Click on the "Replace all" button, and then press Ok. Voila! All spaces are removed. Remove all spaces between numbers

Using formula to remove all spaces

You may need to delete all blanks, like in a formula chain. To do this, you can create a helper column and enter the formula: =SUBSTITUTE(A1," ","")

Here A1 is the first cell of the column with numbers or words where all spaces must be deleted.

Then follow the steps from the part using formula to remove extra spaces between words to 1 Using formula to remove all spaces between numbers

Video: how to remove spaces in Excel



260 comments

  1. Thank you buddy you saved the day :)

  2. Your tool worked fast and deleted leading and trailing spaces before numbers in a 4500-row spreadsheet! Thanks!

  3. Thank you.

  4. In my excel i don't have Ablebits Data option please suggest how to get it.

  5. thank you!

  6. Thanks buddy

  7. Dear All,

    Kindly help me into provide a formula for the below case.
    I need to delete space after number.
    581086
    581086
    581086

  8. I took the time to actually say thank you this time, usually i don't bother.

  9. remove space between numbers did not work for me!

    • Worked for Me.

  10. 53 X 101 after replace space i got only 53X 101 . But i want 53X101... Please help

  11. I want revmove space 53X 101

  12. good one

    Thank you

  13. I have a problem in my excel

    like 1zw76589246565992 . in right hand side one space is there

    if I try to trim that one it appears trim formula. I don't want it because I want to duplicate the files like 1zw76589246565992 .- 1zw76589246565992

    So please tell me how can I remove the space without appearing formula?...

  14. I have a problem in my excel

    like 1zw76589246565992 . in right hand side one space is there

    if I try to trim that one it appears trim formula. I don't want it because I want to duplicate the files like 1zw76589246565992 .- 1zw76589246565992

    So please tell me how can I remove the space without appearing formula?...

  15. Thanks, I searched a lot for removing space but it worked with call cleaner add-in Finally.

  16. Perfect... its really wonderful

  17. Hi, How am I going to copy paste formula with spaces(filtered) between cells?Thank you!

  18. More then one space in front of numbers , how to remove?

  19. Excellent

  20. 1000
    5000
    2000

    how can i remove the space, plz help

  21. very nice its works........

    but can you tell me now how to copy and paste this corrected excel worksheet data in another sheet. because its not pasted in another sheet.

    and even we delete the previous and unstructured data then automatically corrected data invisible or unstructured in shape of #REF! this.

    so please help me how to use this corrected data or paste this data in another sheet.

    thanks

  22. Reds 19 Joey Votto Red Cool Base Stitched MLB Jersey.Great service of online buy usa soccer sweatshirt,and enjoy
    our cheap nfl authentic jerseys china 79% off.

  23. Its very healpfull

  24. Very helpful. This saved so much time.

  25. Very helpful.
    Thanks a lot

  26. Thanks a lot. Very useful.

  27. VERY HELPFULL

  28. Great job , it really worked for me
    Thanks

  29. dear Sir,

    i would like to remove some extra words from one column,

    how to use trim formula here

  30. How to remove space before and after of /
    Please help on it.

  31. Select the whole column/width Choose find option/Ctrl "S" select space button and replace it .

  32. thanks very much for a good work done

  33. Precisely I got what I want

  34. can I make my number look like $22 instead of $ 22

    • Depending on the version of Excel you are running, if you format the cell as currency, it should automatically remove any unnecessary spaces for you.

      I hope this helps

  35. Thank you very much Renat Tlebaldziyeu (Ablebits.com Team)

    It worked.......

  36. 04 100 950105 - this is the original

    04100950105 - i want to make it like this

      • i hve tried but it is not cming....can u pls guide in formula
        i want to remove space between 04 100 950105 it has to be 04100950105

        • Try Joel's solution above:
          "Didnt work for me too, however found the right way. Select and highlight the space you want to get rid of. Copy this space and select the find and replace. Paste this space in find and replace with nothing. I guess it wasnt a space in the first place. Whatever it was you now find it by copying whatever it was. Hope it works for you."

  37. Thank you. I just used this to solve a major problem at work now. God bless.

  38. tnx a lot

  39. thanks a lot for your suggestion .

  40. this was wonderful. it saved me hundreds of working minutes

  41. Thanks a lot

  42. Thank you mannn...

  43. thank you, very helpful

  44. Thanking you. very useful

  45. plz find ans. this problem

    you cannot use this command on protected seet to use this command you must first unprotect the seet

  46. Perfect save the day!

  47. Its amazing,,
    Very helpful to everyone

  48. how to remove blank cells from the column in excel sheet.

  49. I try to copy number for web to paste into an excel but i still can't get rid of that space could someone help me please here is the subject.
    (2 917.20 )

  50. Helo,
    Please guide me how to remove space before a Number like below

    " 0.29"
    " 1.459"

Post a comment



Thank you for your comment!
When posting a question, please be very clear and concise. This will help us provide a quick and relevant solution to
your query. We cannot guarantee that we will answer every question, but we'll do our best :)