+ Reply to Thread
Results 1 to 6 of 6
  1. #1
    Registered User
    Join Date
    10-16-2009
    Location
    South Africa
    MS-Off Ver
    Excel, Word, Powerpoint 2007
    Posts
    47

    Remove spaces in data copied from Excel

    I have to copy certain columns from an Excel sheet and paste it in a Word table.

    That's a doddle, but for some reason after I've pasted the columns all the values have a number of spaces in front of them.

    How do I prevent this from happening. Deleting the multiple spaces is easy, but the last one is not so easy. Please note that I am forced to use spaces as the thousands separator, so I cannot delete all the spaces!
    Last edited by antonf; 11-25-2009 at 07:49 AM.

  2. #2
    Forum Moderator Richard Buttrey's Avatar
    Join Date
    02-15-2008
    Location
    Grappenhall, UK
    MS-Off Ver
    Excel for Windows & Mac - all versions.
    Posts
    5,829

    Re: Remove spaces in data copied from Excel

    Hi,

    Have you tried the =TRIM() function to remove preceding or trailing spaces?

    HTH
    Richard Buttrey

    If this was useful then please rate it appropriately.

    Click the small star icon at the bottom left of my post.

  3. #3
    Registered User
    Join Date
    10-16-2009
    Location
    South Africa
    MS-Off Ver
    Excel, Word, Powerpoint 2007
    Posts
    47

    Re: Remove spaces in data copied from Excel

    Excuse my ignorance, but how do I get to use an Excel function in Word?

  4. #4
    Forum Guru contaminated's Avatar
    Join Date
    05-07-2009
    Location
    Baku, Azerbaijan
    MS-Off Ver
    Excel 2010
    Posts
    1,335

    Re: Remove spaces in data copied from Excel

    Try next
    1 Open your document\
    2 Press Ctrl+H
    3 Click More > Special > White Space
    4 Leave "Replace with" field bland or type there smth.
    5 Press Replace All button

    HTH
    Люди, питающие благие намерения, как раз и становятся чудовищами.

    Regards, «Born in USSR»
    Vusal M Dadashev

    Baku, Azerbaijan

  5. #5
    Registered User
    Join Date
    10-16-2009
    Location
    South Africa
    MS-Off Ver
    Excel, Word, Powerpoint 2007
    Posts
    47

    Re: Remove spaces in data copied from Excel

    Thanks HTH, it works fine but then deletes the separator between the thousands as well.

    I gave up on the issue - selected the table and selected and replaced all "double spaces" with single spaces, which left me with preceding spaces as well. Juggling with the column widths assisted in "hiding" the impact of those spaces.

  6. #6
    Forum Moderator Richard Buttrey's Avatar
    Join Date
    02-15-2008
    Location
    Grappenhall, UK
    MS-Off Ver
    Excel for Windows & Mac - all versions.
    Posts
    5,829

    Re: Remove spaces in data copied from Excel

    Hi,

    I had assumed that the spaces were present in the Excel sheet and copied over, hence the advice to get rid of them with the =TRIM() before copying and pasting.

    Rgds
    Richard Buttrey

    If this was useful then please rate it appropriately.

    Click the small star icon at the bottom left of my post.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.2.0