+ Reply to Thread
Results 1 to 14 of 14

text file merging and filtering using macro's

  1. #1
    Registered User
    Join Date
    02-04-2012
    Location
    Philippines
    MS-Off Ver
    Excel 2007
    Posts
    40

    text file merging and filtering using macro's

    Hello im a vb noob.

    any one can help me solve my problems.

    i have a code here from Ron de Bruin.
    that merge text file.

    my problem is how can i filter my data, range:all in column A that starts with value:A, AB or ABC and paste it the entire row to the other worksheet using macro.

    thanks.


    Please Login or Register  to view this content.
    Last edited by scambug; 02-06-2012 at 11:40 PM.

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: text file merging and filtering using macro's

    Why dont you attach some sample text files? And also a sample of the other file where the data needs to be copied to?
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  3. #3
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,090

    Re: text file merging and filtering using macro's

    Hello and welcome to the forum. Unfortunately ...

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code. Posting code without them makes your code hard to read and difficult to be copied for testing. Highlight your code and click the # at the top of your post window. For more information about these and other tags, found here
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  4. #4
    Registered User
    Join Date
    02-04-2012
    Location
    Philippines
    MS-Off Ver
    Excel 2007
    Posts
    40

    Re: text file merging and filtering using macro's

    Sorry Sir.

  5. #5
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,090

    Re: text file merging and filtering using macro's

    That's OK. Just fix it

  6. #6
    Registered User
    Join Date
    02-04-2012
    Location
    Philippines
    MS-Off Ver
    Excel 2007
    Posts
    40

    Re: text file merging and filtering using macro's

    @arlu1201

    Hi Sir,

    here is my file attach.
    Last edited by scambug; 02-06-2012 at 02:17 AM.

  7. #7
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: text file merging and filtering using macro's

    You need to alter your first post by putting code tags (check the forum rules how to do that) and only then i can provide you a solution.

  8. #8
    Registered User
    Join Date
    02-04-2012
    Location
    Philippines
    MS-Off Ver
    Excel 2007
    Posts
    40

    Re: text file merging and filtering using macro's

    hi Arlu,

    im done. please help.

  9. #9
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: text file merging and filtering using macro's

    Maybe this option is suitable (see attachment)
    Attached Files Attached Files

  10. #10
    Registered User
    Join Date
    02-04-2012
    Location
    Philippines
    MS-Off Ver
    Excel 2007
    Posts
    40

    Re: text file merging and filtering using macro's

    thank you sir, this is a great help.
    but how can i manage to get that kind of output using the code above.

    coz i'm merging a bunch of text file, csv file.

    thank you.

  11. #11
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: text file merging and filtering using macro's

    Can you show a couple of your csv files?

  12. #12
    Registered User
    Join Date
    02-04-2012
    Location
    Philippines
    MS-Off Ver
    Excel 2007
    Posts
    40

    Re: text file merging and filtering using macro's

    Here Sir,

    this is just a couple of my files.
    a sample txt file.

    Thanks.
    Attached Files Attached Files

  13. #13
    Registered User
    Join Date
    02-04-2012
    Location
    Philippines
    MS-Off Ver
    Excel 2007
    Posts
    40

    Re: text file merging and filtering using macro's

    Hi
    ive got another problem, anyone can help give me a code for this.

    i need to lookup all cell data in column A.[lookup value is in all colum a], table array is in worksheet 2[column A,B]output value must be the "value in colum B"

    if a cell in colum A is blank then it will automatically gives a value "TBD"

    appreciate your help.

    Thank you.

  14. #14
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,090

    Re: text file merging and filtering using macro's

    The current thread doesn't appear to have been resolved completely.

    This is a different question and should be opened in a new thread. I suspect you need VLOOKUP.

    Regards, TMS

+ 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