+ Reply to Thread
Results 1 to 5 of 5

Delimit string to columns after using TRIM?

  1. #1
    Registered User
    Join Date
    04-11-2013
    Location
    USA
    MS-Off Ver
    Excel 2013
    Posts
    15

    Delimit string to columns after using TRIM?

    Okay, so I have a row of data with lots of spaces between characters, simple to use TRIM to remove all but 1 space between each 'column' in the cell. Can I use an array formula or macro to transfer each 'column' of data within that cell to an actual column?

    Example:

    Please Login or Register  to view this content.
    Gets TRIM'd down to:

    Please Login or Register  to view this content.
    With spaces in between. I can't use LEFT/MID because if say, the first 'column' changes to 101,451 upon data refresh I will lose characters.

    Basically I want to take the TRIM version and convert to columns automatically


    Please Login or Register  to view this content.
    ....etc
    Last edited by peepingtom; 04-27-2013 at 08:05 PM.

  2. #2
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,612

    Re: Delimit string to columns after using TRIM?

    Data..Text to Columns is one option
    Ben Van Johnson

  3. #3
    Registered User
    Join Date
    04-11-2013
    Location
    USA
    MS-Off Ver
    Excel 2013
    Posts
    15

    Re: Delimit string to columns after using TRIM?

    Yes but I need it to do it automatically. Can you point me to VBA or something that would do so?

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,936

    Re: Delimit string to columns after using TRIM?

    You could write your own macro, using the macro recorder. If you have not used it before, practice a few times using T2C, the click the macro record button - next to READY at the botton left corner

    do what you want, it will be recorded into a macro. click again when you are finished. Then create a "shape" and allocate the macro to that, you will then have a macro button
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  5. #5
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,936

    Re: Delimit string to columns after using TRIM?

    I recored this in about 15 seconds, and you dont even need to remove spaces, T2C does it all for you

    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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