+ Reply to Thread
Results 1 to 7 of 7

Copy text files underneath each other

  1. #1
    Registered User
    Join Date
    03-03-2013
    Location
    Hamburg, Germany
    MS-Off Ver
    Excel 2010
    Posts
    5

    Copy text files underneath each other

    Dear Experts,

    I have about 400 text files and I want to put them underneath each other in an excel sheet. The columns are always from A to O but the amount of lines variates.

    I have this macro but it always stops at VerzVar = Dir(Pfadname & "*.txt").

    Furthermore, it is possible to embed the deleting of the first line of each text file first?

    Thanks heaps!!
    Stefan

    (I use Ecxel 2010 on a Mac 10.6.8)

    Please Login or Register  to view this content.
    Last edited by ditöle; 03-05-2013 at 07:35 AM.

  2. #2
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,758

    Re: Copy text files underneath each other

    I'm a bit puzzled should not the line with "Pfadname" read
    Please Login or Register  to view this content.
    and I think you are missing a backslash so you either add it to the "Pfadname" string or you change "VerzVar" to
    Please Login or Register  to view this content.
    Alf

    Sorry just reread your post and see you are using the Excel Mac version so I'm not sure my advice will help you at all.
    Last edited by Alf; 03-03-2013 at 12:27 PM.

  3. #3
    Registered User
    Join Date
    03-03-2013
    Location
    Hamburg, Germany
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Copy text files underneath each other

    Hey Alf,

    thanks heaps for your answer. I have tried it. Unfortunately it did not work, though. I have even tried it with / and with \. It still stops at
    Please Login or Register  to view this content.

  4. #4
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,758

    Re: Copy text files underneath each other

    Perhaps you may find something of interest in this link? Allmost at the bottom of the page there is an example "Loop through all files in a folder on a Mac"

    http://www.rondebruin.nl/mac.htm#Loop

    Alf

  5. #5
    Registered User
    Join Date
    03-03-2013
    Location
    Hamburg, Germany
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Copy text files underneath each other

    That sounds very interesting!!! I will have a closer look at it tomorrow. Thanks heaps!!!

  6. #6
    Registered User
    Join Date
    03-03-2013
    Location
    Hamburg, Germany
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Copy text files underneath each other

    Dear Alf,

    I have tried it and it works perfectly fine. Thanks!!!!

  7. #7
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,758

    Re: Copy text files underneath each other

    Glad to be of help and thanks for feedback.

    Alf

    Ps Don't forget to mark your thread "Solved"

    To mark your thread solved do the following:
    - Go to the first post
    - Click edit
    - Click Advance
    - Just below the word "Title:" you will see a dropdown with the word No prefix.
    - Change to Solve
    - Click Save

+ 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