+ Reply to Thread
Results 1 to 7 of 7

How to Clean an Imported Text file with VBA

  1. #1
    Forum Contributor
    Join Date
    06-20-2012
    Location
    India
    MS-Off Ver
    Office 365
    Posts
    454

    How to Clean an Imported Text file with VBA

    Hello,

    I have imported a text file into excel and i want to clean the report by making the following changes.

    1. Remove all the rows to the end of the list having dotted lines (-----------)

    2. Remove Rows having Product Totals

    3. sort the data according to the account number.

    4. Merge the headers into a single row

    I am herewith attaching the sample file with actual and desired format sheets.

    Kindly help me with a vba code .

    Regards,

    Zaska
    Attached Files Attached Files

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: How to Clean an Imported Text file with VBA

    This should do it:
    Please Login or Register  to view this content.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    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: How to Clean an Imported Text file with VBA

    Hi zaska

    And another
    Please Login or Register  to view this content.
    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.

  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: How to Clean an Imported Text file with VBA

    @ JB

    Per a PM I received at 3:21 PM zaska is apparently a student working on an assignment. As an Admin please take whatever steps you feel appropriate.

  5. #5
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: How to Clean an Imported Text file with VBA

    The request for assistance on homework assignments is not a per se rule violation. We just don't typically provide indepth answers to homework, we strive to help OPs understand their issues and rectify them. Now that we know Zaska's question are homework related, we can adjust our responses accordingly.

    The solicitation of Excel assistance via Private Messages is a rule violation.

  6. #6
    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: How to Clean an Imported Text file with VBA

    @ zaska

    Take it for what it's worth...I'm a bit confused...all said and done...you have two solutions to your homework...

    For me...I've unsubscribed...

  7. #7
    Forum Contributor
    Join Date
    06-20-2012
    Location
    India
    MS-Off Ver
    Office 365
    Posts
    454

    Re: How to Clean an Imported Text file with VBA

    Sorry for violating the forum rules.

    Regards,
    Zaska

+ 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