+ Reply to Thread
Results 1 to 3 of 3

Thread: Remove spaces

  1. #1
    Registered User
    Join Date
    10-28-2011
    Location
    Delhi
    MS-Off Ver
    Excel 2007
    Posts
    86

    Remove spaces

    Hi

    How to remove all spaces from texts in a cell and therefore in an entire column.

    Thanks

  2. #2
    Valued Forum Contributor
    Join Date
    09-27-2011
    Location
    Poland
    MS-Off Ver
    Excel 2007
    Posts
    892

    Re: Remove spaces

    with vba
    Sub aa()
    Dim x&
    For x = 1 To Cells(Rows.Count, "a").End(xlUp).Row
    Cells(x, 1).Value = Replace(Cells(x, 1).Value, " ", "")
    Next
    End Sub
    Regards

    tom1977

    If You are satisfied with my solution click the small star icon on the left to say thanks.

  3. #3
    Forum Guru TMShucks's Avatar
    Join Date
    07-15-2010
    Location
    Manchester, England
    MS-Off Ver
    MSO 2003 & 2007
    Posts
    6,188

    Re: Remove spaces

    Use Replace All with a single space in the first box and nothing in the second box. Select the column first.


    Regards, TMS

+ 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.2.0