• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

How to remove extra spaces in Excel 2003

Kirn

New Member
Hi,


Each day I have to copy and paste data from the internet over to Excel - the data copies over as HTML and adds in an additional space which I cannot remove via the Find and Replace function. Does anyone know any other ways to quickly remove this spacing?


Thanks,


Kirn
 
Hi, Kirn!

When you say "additional space" do you mean interlining or embedded spaces between the text? If it's the first case, you'll have to add VBA code to remove the line feeds or break lines, while if it's the second, Excel function TRIM should work.

An alternative may be copying the text on a text editor (Notepad++, Word, etc.), format the text there and then copy the neat text to your Excel file. I'll depend on the copy/paste operations you do daily.

Regards!
 
Hi Kirn ,


To add to what others have posted , what you think are spaces may not really be the space character. For example , the following text :


 $                22.00


contains what look like spaces but are really a different ASCII character. In such a case , what you can do , place your cursor in any cell which contains these "spaces" , press F2 , move the cursor to one of these "spaces" and press CTRL C to copy this character. Now in your Find and Replace dialog box , in the Find box , paste ( CTRL V ) this copied character ; in the Replace box , just press Enter , and select Replace All. Check whether these "space" characters have been replaced.


Narayan
 
In addition to the above comments I nearly always do a simple

Find & Replace (Ctrl H)

Search for Space Space

Replace with Space

Obviously replace the Spaces above with a single press of the Space Bar


You may need to do this several times


This is also useful when transferring data From/To Excel & Word
 
Back
Top