Results 1 to 28 of 28

Importing multiple text files into multiple worksheets

Threaded View

  1. #1
    Registered User
    Join Date
    09-11-2010
    Location
    Seattle, WA
    MS-Off Ver
    Excel 2002, 2003,2007
    Posts
    39

    Importing multiple text files into multiple worksheets

    I am setting up a spreadsheet to analyze data from a program I use. The files are with extension .npe, but to upload it, I added the .txt.

    I have the following worksheets: Input, Run Selection, Summary, and R1 through R20.

    On the input tab are the path file locations, starting in C6 and down to C25 (up to 20 files). The paths are from another workbook, and brought in automatically to the Input spreadsheet.

    I want to write a VBA code that reads the info in C6-C25, and writes the text from those files into sheets R1-R20. However, there may be 2 files, 13 files, or 20 files.

    I have most of the code written, but I am having the hardest time figuring out how to read in each of the files and put them into the individual sheets. I have found code that comes close, but the issue is that the code is really extensive, and I'm not sure I need most of it.

    I have attached a sample text file, and the coding I have so far. Any assistance would be appreciated.

    Thanks
    Attached Files Attached Files
    Last edited by new.vbacoder; 09-26-2010 at 03:10 AM.

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