+ Reply to Thread
Results 1 to 5 of 5

eliminating extra spaces in Excel cells

  1. #1
    Laura1
    Guest

    eliminating extra spaces in Excel cells

    Hello everyone, I just ran a report in Access, copied and pasted the data in
    to Excel. Now, though, there are extra spaces after the data in each cell.
    How do I get rid of these extra spaces? I need to do a mail merge and it's
    not merging correctly because of all of these extra spaces.

    So my merge looks like this: Joe Smith

    Any help is appreciated!

  2. #2
    Guest

    Re: eliminating extra spaces in Excel cells

    Hi

    You could use Find/Replace, finding 2 spaces and replacing with 1

    Andy.

    "Laura1" <[email protected]> wrote in message
    news:[email protected]...
    > Hello everyone, I just ran a report in Access, copied and pasted the data
    > in
    > to Excel. Now, though, there are extra spaces after the data in each
    > cell.
    > How do I get rid of these extra spaces? I need to do a mail merge and
    > it's
    > not merging correctly because of all of these extra spaces.
    >
    > So my merge looks like this: Joe Smith
    >
    > Any help is appreciated!




  3. #3
    SVC
    Guest

    RE: eliminating extra spaces in Excel cells

    Use the TRIM function. Create a blank column after column that has the extra
    spaces (e.g. if it is Column A, create Column B), in cell B1 type =TRIM(A1),
    then copy down. Now copy Column B and use Edit > Paste Special, Values to
    paste over the data in Column B and eliminate the formula. You blank spaces
    will be gone.

    "Laura1" wrote:

    > Hello everyone, I just ran a report in Access, copied and pasted the data in
    > to Excel. Now, though, there are extra spaces after the data in each cell.
    > How do I get rid of these extra spaces? I need to do a mail merge and it's
    > not merging correctly because of all of these extra spaces.
    >
    > So my merge looks like this: Joe Smith
    >
    > Any help is appreciated!


  4. #4
    Registered User
    Join Date
    03-16-2006
    Posts
    38
    Hi,
    I feel compelled to post to this becuase I just had the (almost) exact
    same problem that you have now. ANd it took me a day and a half to
    go through the mess, but if it helps you can take a lot at

    http://www.excelforum.com/showthread.php?t=523214
    http://www.excelforum.com/showthread.php?t=523549

    try this macro:



    Sub No_010_013()
    Dim rCell
    Dim NewValue As String
    Dim K As Long 'counter

    For Each rCell In ActiveSheet.UsedRange
    For K = 1 To Len(rCell.Value)
    If Asc(Mid(rCell.Value, K, 1)) <> 13 Then
    NewValue = NewValue & Mid(rCell.Value, K, 1)
    Else
    NewValue = NewValue & " "
    End If
    Next K
    rCell.Value = "'" & NewValue
    NewValue = ""
    Next rCell
    End Sub



    Good Luck!
    Last edited by bxc2739; 03-17-2006 at 01:54 PM.

  5. #5
    CLR
    Guest

    RE: eliminating extra spaces in Excel cells

    ASAP Utilities, available free from www.asap-utilities.com, has a feature
    that will do this for you, among many other things.

    Vaya con Dios,
    Chuck, CABGx3



    "SVC" wrote:

    > Use the TRIM function. Create a blank column after column that has the extra
    > spaces (e.g. if it is Column A, create Column B), in cell B1 type =TRIM(A1),
    > then copy down. Now copy Column B and use Edit > Paste Special, Values to
    > paste over the data in Column B and eliminate the formula. You blank spaces
    > will be gone.
    >
    > "Laura1" wrote:
    >
    > > Hello everyone, I just ran a report in Access, copied and pasted the data in
    > > to Excel. Now, though, there are extra spaces after the data in each cell.
    > > How do I get rid of these extra spaces? I need to do a mail merge and it's
    > > not merging correctly because of all of these extra spaces.
    > >
    > > So my merge looks like this: Joe Smith
    > >
    > > Any help is appreciated!


+ Reply to Thread

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.6.0 RC 1