+ Reply to Thread
Results 1 to 12 of 12

Dissect textbox string

  1. #1
    Registered User
    Join Date
    05-07-2011
    Location
    Oklahoma City
    MS-Off Ver
    Excel 2003
    Posts
    24

    Dissect textbox string

    i'm trying to enter data into a textbox and then have that data split up into rows (3 columns per row). The data that i'm entering into the textbox is being pulled from another program that consists of 5 columns. so essentially if i just open a blank worksheet and paste the data the first two columns are blank. (not sure if that is pointless or not in this situation.)

    the value of the empty columns appears as the following symbol - 

    Its hard to show you here because when i copy and paste the info it puts it as 5 columns (even in notepad)

    this is the value of the textbox if i enter the value of the textbox into one cell is as follows (symbol equals the square symbol from above)

    symbol symbol 12091216212250 symbol 2012-09-14 16:30:00.0 symbol Doe, John symbol symbol symbol 12091216212250 symbol 2012-09-14 16:30:00.0 symbol Doe, John symbol symbol symbol 12091216212250 symbol 2012-09-14 16:30:00.0 symbol Doe, John symbol

    basically i want three columns of data from this to look like this...

    12091216212250 2012-09-14 16:30:00.0 Doe, John
    12091216212250 2012-09-14 16:30:00.0 Doe, John
    12091216212250 2012-09-14 16:30:00.0 Doe, John


    another way to put it is i'm trying to get rid of the two blank columns at the start of each row of data. but i'm also needing the first number in its own array value (maybe) so i can check it that number exists.

    i've probably confused everyone or make no sense, but if you can help in anyway i'll try to help you understand better.

  2. #2
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,517

    Re: Dissect textbox string

    Create a workbook of what it actually looks like after you do your paste and show what you want it to look like and upload your workbook.
    Thanks,
    Mike

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved.

  3. #3
    Registered User
    Join Date
    05-07-2011
    Location
    Oklahoma City
    MS-Off Ver
    Excel 2003
    Posts
    24

    Re: Dissect textbox string

    i made a quick example of what i'm talking about to try and help
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    05-07-2011
    Location
    Oklahoma City
    MS-Off Ver
    Excel 2003
    Posts
    24

    Re: Dissect textbox string

    ok...made a better one

    sheet 1 shows the data and how it appears as a variable in VBA, with the funny square symbols

    sheet 2 is how i want it to look
    Attached Files Attached Files

  5. #5
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,517

    Re: Dissect textbox string

    This might be a hard one. Let me work on it. Maybe someone else here maybe able to help us in the meantime.
    Last edited by mike7952; 09-19-2012 at 12:43 AM.

  6. #6
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,517

    Re: Dissect textbox string

    This will work on your first workbook upload. When I first looked at the string I couldn't see the Tab between the values.

    Please Login or Register  to view this content.
    Last edited by mike7952; 09-19-2012 at 12:22 AM.

  7. #7
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,517

    Re: Dissect textbox string

    On your second workboo I dont see sheet1 or sheet2 or the funny symbols. Did you upload the wrong workbook?

  8. #8
    Registered User
    Join Date
    05-07-2011
    Location
    Oklahoma City
    MS-Off Ver
    Excel 2003
    Posts
    24

    Re: Dissect textbox string

    thanks, i'm going to play with this some. from a quick view i think i may be able to take it from here.

    your a life saver. one question though about the formula. What is the "h", "i", "j" referring to

  9. #9
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,517

    Re: Dissect textbox string

    They are the columns. and add 1 to the i value because i will start at 0 and there is no 0 row

  10. #10
    Registered User
    Join Date
    05-07-2011
    Location
    Oklahoma City
    MS-Off Ver
    Excel 2003
    Posts
    24

    Re: Dissect textbox string

    its possible as i'm a little scatter brained right now.

    your code above has gotten me to the point that i can take over from here, but i would like to learn exactly what your code does, if you can break it down for me.

  11. #11
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,517

    Re: Dissect textbox string

    see if this helps.

    Please Login or Register  to view this content.

  12. #12
    Registered User
    Join Date
    05-07-2011
    Location
    Oklahoma City
    MS-Off Ver
    Excel 2003
    Posts
    24

    Re: Dissect textbox string

    thanks a million!!!

+ 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