+ Reply to Thread
Results 1 to 6 of 6

remove white spaces in a specific column

  1. #1
    Forum Contributor
    Join Date
    08-07-2008
    Location
    United States
    MS-Off Ver
    Microsoft Office 2003
    Posts
    362

    remove white spaces in a specific column

    hi everyone,

    i saw this code from Ron and it remove whitespaces
    Please Login or Register  to view this content.
    i am trying to tweak the code to fit my need because I would like to make this code work for column i only like i2:i63350 ...anybody can help me how to accomplish this?

    thanks,

    josh
    Last edited by stoey; 05-12-2014 at 03:07 PM. Reason: marked as solved

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,884

    Re: remove white spaces in a specific column

    Try this:

    Please Login or Register  to view this content.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: remove white spaces in a specific column

    Hi, stoey,

    you could try and apply an Autofilter and delete all the visible cells (if any) by using SpecialCells(xlCellTypeVisible) - please make sure to check if there are any cells of that type before running the command in order to avoid a run-time error.

    Ciao,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

  4. #4
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: remove white spaces in a specific column

    Well for starters you would need to remove the apostrophes before each line. Then you could do something like this:

    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    08-07-2008
    Location
    United States
    MS-Off Ver
    Microsoft Office 2003
    Posts
    362

    Re: remove white spaces in a specific column

    hi again,

    thanks for the quick response: alan, haho and stnk....i very much appreciate your answers. Here's the thing..I get to try alan and stnk resolution and it worked well..however, i don't get hahobe's approach...probably you can give me a sample vba on how to do this...thanks a lot..you guys rock

  6. #6
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: remove white spaces in a specific column

    Hi, stoey,

    if you understodd the basics of this you might try and record a macro via Macro-Recorder to get the basic code which needs to be worked on which may result in a code like this:
    Please Login or Register  to view this content.
    Ciao,
    Holger

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] How to remove white spaces from a phrase?
    By sami770 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-30-2014, 02:02 PM
  2. [SOLVED] Remove unnecessary spaces from column c
    By aviatecar in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-30-2013, 01:28 PM
  3. Remove White Spaces from all cells
    By modest_16081982 in forum Excel General
    Replies: 18
    Last Post: 05-03-2013, 07:22 AM
  4. Remove white spaces in Back
    By dziw in forum Excel General
    Replies: 2
    Last Post: 07-19-2006, 01:55 PM
  5. how to remove spaces in a cell/column
    By P.M.SANJAY in forum Excel General
    Replies: 4
    Last Post: 01-07-2006, 04:21 AM

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