And a prompt box will pop out to remind you select the range that you want to remove the excess spaces, see screenshot:Ĥ. Click Run button or press F5 key to run the VBA. Set WorkRng = Application.InputBox("Range", xTitleId, WorkRng.Address, Type:=8) VBA: Remove extra spaces between words: Sub TrimExcessSpaces() Click Insert > Module, and copy the VBA into the module. Hold ALT button and press F11 on the keyboard to open a Microsoft Visual Basic for Application window.Ģ. With VBA, you also can remove extra spaces between words.ġ. Remove extra spaces between words with VBA As they are formulas, so when you copy and paste them to other places, you need to paste them as values. And all extra spaces between characters have been removed from the range. Press Enter key and select B1, then drag the fill handle over the range of cells that you want to apply this formula. Type formula =TRIM(A1) in cell B1 which is adjacent to cell A1, see screenshot: In Excel, you can remove extra spaces between words with TRIM.
Split Tools: Split Data into Multiple Sheets Based on Value One Workbook to Multiple Excel, PDF or CSV Files One Column to Multiple Columns.Merge Tools: Multiple Workbooks and Sheets into One Merge Multiple Cells/Rows/Columns Without Losing Data Merge Duplicate Rows and Sum.More than 20 text features: Extract Number from Text String Extract or Remove Part of Texts Convert Numbers and Currencies to English Words.Reuse Anything: Add the most used or complex formulas, charts and anything else to your favorites, and quickly reuse them in the future.You may need to play with the spacing below and above paragraphs first.Kutools for Excel Solves Most of Your Problems, and Increases Your Productivity by That should move the 2nd table to be immediatly below the first, and look like it's only one table. This is most easily done if you have paragraph markers visibleġ) Create a table of the required size except for the last 2 rowsĢ) Set the spacing between cells as requiredģ) In the body of the document below the existing table create a new table of the required size without the cell spacingĤ) select the paragraph marker between the tables and delete it. It is also a bit tricky adding more rows if needed - especially into the upper rows.
The minor problem is that the left and right end cells of these last 2 rows line up with the equivalent edges of the cells above. The will give you a table with all but the last 2 rows having spacing between cells, while the bottom 2 rows are in contact. ġ) Create a table with the required number of rows and columns,Ģ) then merger the last 2 rows into together to make one cell the sise of the entire 2 rows.ģ) Next set the spacing between cells as required - that will include your super-sized bottom cellĤ) Into that bottom cell (the one that's the width of the table) insert a table of 2 rows and the correct number of columns Neither is entirely satisfactory, but may be good enough for the job. Found a couple of ways to trick Word 2010 into giving the appearance of the last 2 rows of a table not having spacing between cells.