+ Reply to Thread
Results 1 to 29 of 29

pattern recognizing in excel for a large data set

  1. #1
    Registered User
    Join Date
    09-05-2013
    Location
    New York, USA
    MS-Off Ver
    Excel 2010
    Posts
    21

    pattern recognizing in excel for a large data set

    hello all i have a 34 MB file that i will be bringing in from a .txt file and have data that is all lumped together. i want to set it up so that the first 9 numbers and letters are thrown into one column, the next 3 numbers are thrown into another column and the next 8 numbers are thrown into another column and so on and so forth. i have about 10-15 more columns in this fashion any advice ?

  2. #2
    Valued Forum Contributor tony h's Avatar
    Join Date
    03-14-2005
    Location
    England: London and Lincolnshire
    Posts
    1,187

    Re: pattern recognizing in excel for a large data set

    If you use the OPEN and use the FIXED WIDTH option that should do it for you. The Open normally only looks at Excel files so you need to change the type to TXT


    click on the * Add Reputation if this was useful or entertaining.

  3. #3
    Registered User
    Join Date
    09-05-2013
    Location
    New York, USA
    MS-Off Ver
    Excel 2010
    Posts
    21

    Re: pattern recognizing in excel for a large data set

    1TRANS20130925 193SPD DOMESTIC PORTFOL0001 102260193000000 0000193429DTCCCDT 20130925 21:29 RDT 20130925 21:32
    01WREI 18383M47200220130926000001080005000000000000000238+0000000000000+0000183506612+0000000003670+0000000027493+0000004000000000000000000+
    02AKR 0042391090002013092600000221WREI 18383M472002


    Thanks for the input Tony but that wouldnt work so here is how the data pops up, so here is how i want the data to be separated in excel ..

    02 AKR 004239109 000 20130926 00000221 WREI 18383M472002

  4. #4
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: pattern recognizing in excel for a large data set

    Hi maulik1k

    Please post your Raw Data Text File.
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

  5. #5
    Valued Forum Contributor tony h's Avatar
    Join Date
    03-14-2005
    Location
    England: London and Lincolnshire
    Posts
    1,187

    Re: pattern recognizing in excel for a large data set

    maulik1k you say "it didn't work" it really helps to encourage people to help you if you provide a better explanation. It could mean: the file didn't open, the file opened but the columns were not correct, The columns were correct but this isn;t actually what I was trying to achieve. But "it didn't work" leaves us guessing what you might have done and what might be wrong - which normally means I would just ignore the thread.

    Anyway as you are fairly new here are some images of me doing this and achieving what I thought was the right answer

    fixfile.jpg

  6. #6
    Registered User
    Join Date
    09-05-2013
    Location
    New York, USA
    MS-Off Ver
    Excel 2010
    Posts
    21

    Re: pattern recognizing in excel for a large data set

    Hi Guys thank you for the input. I am attaching a the raw data file here. As you would notice this is how the data appears in the txt file.

    here is how i want to separate the data in excel.

    - in A1 i want WREI
    - starting in B2 i was looking to have the data come up as

    AKR 004239109 000 20130926 00000221 WREI 18383M472002

    About 110 lines down WREI changes to SOXL and then about 35 lines down it changes to AGLS so essentially my goal is to separate everything under each contraparty symbol ( WREI, SOXL, AGLS etc etc)

    thank you all for all your help.

    Raw Data File-1.txt

  7. #7
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: pattern recognizing in excel for a large data set

    Hi maulik1k

    Try this Code
    Please Login or Register  to view this content.
    You'll need to change these lines as required
    Please Login or Register  to view this content.
    Please Login or Register  to view this content.

  8. #8
    Registered User
    Join Date
    09-05-2013
    Location
    New York, USA
    MS-Off Ver
    Excel 2010
    Posts
    21

    Re: pattern recognizing in excel for a large data set

    hi jaslake,

    thanks for the code, my question is when i paste this data into excel there are 200,000 lines of data, will this code run as a loop through all the contraparty symbols ?

    Thanks again for all your help guys

  9. #9
    Registered User
    Join Date
    09-05-2013
    Location
    New York, USA
    MS-Off Ver
    Excel 2010
    Posts
    21

    Re: pattern recognizing in excel for a large data set

    ok nevermind i just read your directions and i am not even pasting the text from the raw data file to the excel file.

  10. #10
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: pattern recognizing in excel for a large data set

    Hi maulik1k

    I don't know what this is
    contraparty symbols
    but I do know there are limitations on Auto Filter.

    Best I can tell you is try it on a Copy of your Raw Data File.

  11. #11
    Registered User
    Join Date
    09-05-2013
    Location
    New York, USA
    MS-Off Ver
    Excel 2010
    Posts
    21

    Re: pattern recognizing in excel for a large data set

    oh sry when i mean contraparty symbols i am talking about the (WREI, SOXL, AGLS) that are present in the left hand side of the text file.

  12. #12
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,523

    Re: pattern recognizing in excel for a large data set

    Do you want to list those "symbols"?
    Please Login or Register  to view this content.

  13. #13
    Registered User
    Join Date
    09-05-2013
    Location
    New York, USA
    MS-Off Ver
    Excel 2010
    Posts
    21

    Re: pattern recognizing in excel for a large data set

    thanks for the code jindon, what do you mean when u say list those codes ?

  14. #14
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,523

    Re: pattern recognizing in excel for a large data set

    Have you tried the code?

  15. #15
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: pattern recognizing in excel for a large data set

    Hi maulik1k

    Have you tried this Code...we're not getting feedback here...the Code I provided works on your Sample File
    try it on a Copy of your Raw Data File

  16. #16
    Registered User
    Join Date
    09-05-2013
    Location
    New York, USA
    MS-Off Ver
    Excel 2010
    Posts
    21

    Re: pattern recognizing in excel for a large data set

    jaslake ur first code worked great, jindon i am having a error msg with i try to run your code

  17. #17
    Registered User
    Join Date
    09-05-2013
    Location
    New York, USA
    MS-Off Ver
    Excel 2010
    Posts
    21

    Re: pattern recognizing in excel for a large data set

    jaslake is there way to IM or chat here ?

  18. #18
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: pattern recognizing in excel for a large data set

    Hi maulik1k

    If
    ur first code worked great
    why is this Thread not marked "SOLVED"?

  19. #19
    Registered User
    Join Date
    09-05-2013
    Location
    New York, USA
    MS-Off Ver
    Excel 2010
    Posts
    21

    Re: pattern recognizing in excel for a large data set

    yea how do i do that ?

  20. #20
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: pattern recognizing in excel for a large data set

    is there way to IM or chat here
    No there's not...

  21. #21
    Registered User
    Join Date
    09-05-2013
    Location
    New York, USA
    MS-Off Ver
    Excel 2010
    Posts
    21

    Re: pattern recognizing in excel for a large data set

    no its fine, the problem has been solved. i would like to close this chat how do i do so

  22. #22
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: pattern recognizing in excel for a large data set

    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

    Or you can use this way:
    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save

  23. #23
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,523

    Re: pattern recognizing in excel for a large data set

    What I meant was this.
    Attached Files Attached Files

  24. #24
    Registered User
    Join Date
    09-05-2013
    Location
    New York, USA
    MS-Off Ver
    Excel 2010
    Posts
    21

    Re: pattern recognizing in excel for a large data set

    Hi jaslake thanks for your help with the code, i wanted to modify the code such that the data being parsed into one of the columns comes in as 2 different columns, and example is

    old output
    column h - 18383M472002

    new output.
    column h - 18383M472
    column i - 002

    how could i make this change.

    thanks

  25. #25
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: pattern recognizing in excel for a large data set

    Hi maulik1k

    Change the two lines of Code as indicated and change the References as previously described
    Please Login or Register  to view this content.

  26. #26
    Registered User
    Join Date
    09-05-2013
    Location
    New York, USA
    MS-Off Ver
    Excel 2010
    Posts
    21

    Re: pattern recognizing in excel for a large data set

    jaslake, i understand those are the two lines that i would have to change but what do i put in the bottom line, i am assumming i would add a 2 to the top line, but how about the bottom line ?

  27. #27
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: pattern recognizing in excel for a large data set

    Hi maulik1k

    Did you change the Code as suggested? If so, what happened...it has been tested...

    The Bottom Line HAS been changed...look at it closely...

  28. #28
    Registered User
    Join Date
    09-05-2013
    Location
    New York, USA
    MS-Off Ver
    Excel 2010
    Posts
    21

    Re: pattern recognizing in excel for a large data set

    hi jaslake it was is the logic behind adding the 18, how do u get that number. i am just trying to logically understand this code. i mean the code works great, but trying to understand just in case i have further changes that come along thanks.

  29. #29
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: pattern recognizing in excel for a large data set

    Hi maulik1k

    There's at a minimum two approaches one can take...trial and error or record a Macro. In this instance I chose to record.

+ 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. Repeating a 23 cell pattern over a large number of cells
    By chris.veinot in forum Excel General
    Replies: 1
    Last Post: 07-19-2010, 09:25 AM
  2. Replies: 4
    Last Post: 06-09-2010, 11:54 PM
  3. Formulas not recognizing new data
    By malakingaso in forum Excel General
    Replies: 1
    Last Post: 02-08-2006, 03:30 PM
  4. Replies: 3
    Last Post: 10-13-2005, 09:05 PM
  5. [SOLVED] repeating a data pattern in excel
    By KelC in forum Excel General
    Replies: 1
    Last Post: 08-01-2005, 04:05 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