Results 1 to 9 of 9

Looping Through Txt Files in Folder and Pasting Contents to Worksheet

Threaded View

  1. #1
    Registered User
    Join Date
    05-03-2019
    Location
    San Francisco
    MS-Off Ver
    7
    Posts
    28

    Looping Through Txt Files in Folder and Pasting Contents to Worksheet

    Hello,

    I am new to VBA and am wondering how I can loop through a folder containing multiple .txt files and paste the data into worksheet cells. These are tab delimited files.

    Some of the requirements are..

    1. I want to start reading each .txt file from the second line. The .txt file has headers that I don't want in the worksheet.

    2. Each row of the .txt file needs to be placed into its own cell, going down a single column. For example, if the .txt file has 5 rows, the worksheet will be filled (A1:A5)

    3. Each file in the folder will be separated by a blank row.


    Any help would be really awesome! Cheers.
    Last edited by bruppert; 05-07-2019 at 04:31 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. looping through a folder, sub folder and files
    By Brazz1 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-15-2019, 03:05 PM
  2. [SOLVED] Looping thru files in folder
    By rpinxt in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 02-22-2018, 06:02 AM
  3. Looping through a folder of files in VBA
    By lizzo in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-13-2013, 05:29 PM
  4. looping through files in a folder
    By bored in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-28-2012, 02:20 AM
  5. Looping through files in a folder
    By pdb78 in forum Excel General
    Replies: 4
    Last Post: 01-27-2012, 12:16 PM
  6. Help with VBS code for looping files in a folder
    By johncassell in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-14-2011, 05:19 AM
  7. Looping through files in a folder
    By prepotency in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-13-2005, 11:23 AM

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