+ Reply to Thread
Results 1 to 6 of 6

split one column into two, according to the lenght of member

  1. #1
    Forum Contributor
    Join Date
    11-12-2007
    Location
    Germany
    MS-Off Ver
    2007
    Posts
    472

    split one column into two, according to the lenght of member

    Hello Every one,
    I want to split one column into two columns, according to the lenght of the members. The members of each cell are seperated with ";".

    For example:
    Col. D
    1;1234567;12,123;123456789;12345;1234

    Now i would like to put those members of col. D in to colm F, whic are longer than 4. The members which are smaller should remain in Col. D

    Col. D
    1;12,123;1234

    Col.F
    1234567;123456789;12345


    I have chosen numbers here only to simplify the problem. The real list contain of words and sentences seperated by ";"

    I will be very thankfull for each assistance.

  2. #2
    Forum Expert
    Join Date
    11-23-2005
    Location
    Rome
    MS-Off Ver
    Ms Office 2016
    Posts
    1,628
    Try to use this code:
    Please Login or Register  to view this content.
    Regards,
    Antonio

  3. #3
    Forum Contributor
    Join Date
    11-12-2007
    Location
    Germany
    MS-Off Ver
    2007
    Posts
    472
    Dear Antonio,
    first of all thank you veeery much. Unfotunately the macro shows me an error (' Runtiime Error 5' Invalid Procedure call or arguemen) if the number of cells in Column D is over 90. I have to process over 140 000 cells with it.
    I am uploading and example file, where it shows error and doesnt process all cells.

    Is it possilbe to delet those members from D which are been pasted into F? That way i will have no double members existing in D and in F.

    ! the file i am uploading is not zip but rar file. So please rename it to file to .rar!

    thank you very much
    Attached Files Attached Files
    Last edited by wali; 09-02-2008 at 06:44 PM.

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678
    Perhaps this:
    Please Login or Register  to view this content.

  5. #5
    Forum Expert
    Join Date
    11-23-2005
    Location
    Rome
    MS-Off Ver
    Ms Office 2016
    Posts
    1,628
    I apologize for error in my code. Now it may run fine.
    Please Login or Register  to view this content.
    Regards,
    Antonio

  6. #6
    Forum Contributor
    Join Date
    11-12-2007
    Location
    Germany
    MS-Off Ver
    2007
    Posts
    472
    Dear SHG,
    thank you very much for your help. The code works perfectly and wonderly fast. Though it also showed error cus the list was too big. But as i splited the list then it worked perfectly. It processed about 30 000 cells in few seconds.
    Thank you very very much. You are great

+ 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. Massive Sorting question.
    By Rgaherty in forum Excel Programming / VBA / Macros
    Replies: 35
    Last Post: 11-07-2007, 02:15 PM
  2. looping issues
    By Marcus Gee in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-09-2007, 11:42 PM
  3. CountA - Dynamic Range - Macro
    By elcentro3m in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 09-10-2007, 02:54 PM
  4. Determine Top 5 in Column
    By mark_c_carey in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-19-2007, 02:26 AM
  5. Replies: 1
    Last Post: 05-02-2007, 10:36 PM

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