+ Reply to Thread
Results 1 to 7 of 7

Import Text File from line number

  1. #1
    Registered User
    Join Date
    04-09-2015
    Location
    London, England
    MS-Off Ver
    2010
    Posts
    30

    Import Text File from line number

    Hi All,

    Someone on this forum kindly helped by with this to bring in a text file to excel.
    Please Login or Register  to view this content.
    I cannot seem to find the original post for some reason but i firstly wanted to thank them, but secondly ask if there was anyway i could add the import to only start at a different line of the text file rather than the top?

    The text files I will want to import will have titles and headers on the first few lines then the data is from line 4 or 5, i would only like to bring in the data and not the headers/titles etc

    Can anyone help?

    Thank you
    Last edited by Leith Ross; 05-03-2015 at 04:58 PM. Reason: Added Code Tags

  2. #2
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Import Text File from line number

    Firstly. You must enclose your code within # tags.

    Select edit, Select you code and then click on th # on the menu bar.

    Try modifying your code like this:

    Please Login or Register  to view this content.
    The 8 is the number of lines to ignore.
    My General Rules if you want my help. Not aimed at any person in particular:

    1. Please Make Requests not demands, none of us get paid here.

    2. Check back on your post regularly. I will not return to a post after 4 days.
    If it is not important to you then it definitely is not important to me.

  3. #3
    Registered User
    Join Date
    04-09-2015
    Location
    London, England
    MS-Off Ver
    2010
    Posts
    30

    Re: Import Text File from line number

    Excellent, just tried it and works perfect

    Thank you for the quick response

  4. #4
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Import Text File from line number

    Please Insert Your # Tags and mark this as solved.

  5. #5
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Re: Import Text File from line number


    Hi,

    Instead of this code, you can use Data, From a file (see QueryTables in VBA) …

  6. #6
    Registered User
    Join Date
    04-09-2015
    Location
    London, England
    MS-Off Ver
    2010
    Posts
    30

    Re: Import Text File from line number

    How do i do the solved?

  7. #7
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Import Text File from line number

    Everything you need to know, including how to add CODE tags to your first post, is in the forum rules.
    Entia non sunt multiplicanda sine necessitate

+ 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 second line of text file to spreadsheet
    By dubbdan in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-11-2014, 09:11 PM
  2. Replies: 0
    Last Post: 10-31-2012, 09:59 AM
  3. [SOLVED] Import text file from VBA code; import all numbers as text
    By maacmaac in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 04-19-2012, 05:19 PM
  4. Reference Text File To Import Using Generic Letter or Number
    By R_S_6 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 02-02-2009, 09:17 AM
  5. [SOLVED] multi-line text file import to excel
    By Waxaholic in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-25-2006, 03:45 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