+ Reply to Thread
Results 1 to 12 of 12

Split String into many columns according to Format criteria

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

    Split String into many columns according to Format criteria

    Hello everyone,
    I have about 100 000 rows containing dictionary data (pashto-english). I have to split each string into many columns according to their format.

    I am attaching an Excel 2007 file containing example data. Worksheet “is” contains real data as it is now and worksheet “should be” contains how it should look like after. In 2nd Row of the ws “should be” I have entered the criteria according to which the strings are to be broken.
    It’s very very important that I find solutions for this. I hope that someone can help me out with it.

    Many thanks in advance!
    Attached Files Attached Files
    Last edited by wali; 05-23-2010 at 01:50 AM.

  2. #2
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,342

    Re: Split String into many columns according to Format criteria

    wow wali I dont think that could be done easly
    how did you enter the data ?
    If the solution helped please donate to RSPCA

    Site worth visiting: Rabbitohs

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

    Re: Split String into many columns according to Format criteria

    I copy and pasted the data from MS Word. I could bring it as far that each cell now contains one word and its whole meanings.
    I hope to get a solution. If not i would have to do at least 0.5 million times cut and paste. :-(

  4. #4
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,342

    Re: Split String into many columns according to Format criteria

    even using reg exp these no real pattern
    have you tried text to columns to break up the lines?

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

    Re: Split String into many columns according to Format criteria

    Yes, i tried that. But it didn't work properly because for that method i need a seperator as letter. And i dont have clear seperators through which i could break the string. What i have instead is the formating, font, color and size.

    I was successful as far through text into columns that I could devide the strings into three columns. Its better than nothing but still its not complete. I am attaching the example:
    Attached Files Attached Files

  6. #6
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,342

    Re: Split String into many columns according to Format criteria

    hey wali
    had a good think and maybe.. with a class module with the properties of the class being font type

  7. #7
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: Split String into many columns according to Format criteria

    If you put your 2007 example as an xls file I could have a look.
    Preferably also the original Word-file as a doc file.

  8. #8
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,342

    Re: Split String into many columns according to Format criteria

    true it may all be in the import

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

    Re: Split String into many columns according to Format criteria

    Hey snb Hey Pike,

    i am uploading the word as well as xls file.
    What I did was that I replaced all douple line breaks "^p^p" of word document into "§§^pµ". Throug doing that i have now specific symbols for the start and for the end of the string. I then copied and pasted the data into excel. There I removed all number which were indexing the source words after "µ". I then replaced the first "two spaces" into "#" and broke the strings on "#" into two columns. The same I did with transcription. And i have now three columns. Words-->Transcription--> and the remaining string. The result was that in my third post.

    What one could also do would be to put all "[?]" in a seperat column as well. [] also contain grammatical identities of the source words and should be seperated.

    I will also keep on trying. But I dont think that on my own I will make it to more columns.
    Attached Files Attached Files

  10. #10
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: Split String into many columns according to Format criteria

    My suggestion:
    Please Login or Register  to view this content.

  11. #11
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,342

    Re: Split String into many columns according to Format criteria

    my thoughts were along the line of splitting the text into font colours

    Please Login or Register  to view this content.
    unfinnished

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

    Re: Split String into many columns according to Format criteria

    Hey you both,

    I can't thank you enough for taking the time for my problem. I love this side of internet and realize each time again and again that Internet without this forum would be almost useless! :-)

    I have the data now in three columns and its more than I had imagined I could do.

    thanks thanks thanks

+ 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