+ Reply to Thread
Results 1 to 5 of 5

import txt or csv delimited parts into different excel sheets

  1. #1
    Registered User
    Join Date
    02-09-2016
    Location
    Bucharest
    MS-Off Ver
    2013
    Posts
    53

    Smile import txt or csv delimited parts into different excel sheets

    Hello friends,

    I'm an Excel 2013 user.
    I'm using some Excel macros to extract some data from a big .txt file. Big means more than 400k lines.
    Parts of this file I extract them into different sheets.
    For this I have a nice macro, that extracts all the rows found between % ... %%% symbols.
    Here attach is the code that is working fine.

    My new challange is to modify somehow this code so to add also the first 8 lines of my .txt file that are not delimited between these % ...%%%.
    These lines I want to put them on the 1st sheet (or the 2nd, because on 1st sheet I'll put some butons to run the macros).

    A sample file with that I'm using it to extract is also attached. I run the macro, a new window opens and i choose the file to be extracted. On the excel, on column A I have all the tables / names of the sheets that will be extracted from txt file.

    Would you be so kind and help me with this?

    In advance many thanks.
    Attached Files Attached Files

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

    Re: import txt or csv delimited parts into different excel sheets

    If this is not what you wanted, need to see your desired result in a workbook.
    Change "test" procedure to below while the other function must be kept intact.
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    02-09-2016
    Location
    Bucharest
    MS-Off Ver
    2013
    Posts
    53

    Thumbs up Re: import txt or csv delimited parts into different excel sheets

    Hello buddy ,

    Thanks for fast reply.
    Your code extract the first 8 lines and add it to every new created sheet.
    My ideea was to extracted only once, and to put it in the next sheet after Sheet1 (and if possible to name it INDEX - it would be great).
    I attached an example of file, with sheet 2 named Index, extracted string is in B2-B3-B4 because i want to delete afterwards the Column A to remove the % signs.

    please see attached archive
    apreciating your time
    Attached Files Attached Files

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

    Re: import txt or csv delimited parts into different excel sheets

    Change to
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    02-09-2016
    Location
    Bucharest
    MS-Off Ver
    2013
    Posts
    53

    Re: import txt or csv delimited parts into different excel sheets

    Thank you my friend.
    This is what I was looking for. You are really good and helpful.
    You made my day really happy.

    Have a great day!
    Keep up the good work!

+ 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. [SOLVED] import txt or csv delimited parts into different excel sheets
    By tuspilica in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 02-11-2016, 03:09 AM
  2. Import a ~ Delimited Text File into Excel
    By vrooom247 in forum Excel Programming / VBA / Macros
    Replies: 18
    Last Post: 12-02-2014, 07:58 AM
  3. import data from tab delimited txt file into on excel sheet
    By flojos in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-05-2013, 08:34 PM
  4. [SOLVED] Import Pipe Delimited files using Excel 2003
    By dikbahlz in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-26-2011, 05:25 AM
  5. Import space delimited text file into excel
    By vijay2482 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-05-2009, 12:29 PM
  6. Import delimited list into excel template
    By ari_b in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-24-2009, 11:09 AM
  7. [SOLVED] I have a Comma delimited text file how do I import in to excel an.
    By trevord in forum Excel General
    Replies: 1
    Last Post: 02-03-2005, 08:06 PM

Tags for this Thread

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