+ Reply to Thread
Results 1 to 4 of 4

Loop trough all folders and subfolders and copy data

  1. #1
    Forum Contributor
    Join Date
    12-13-2012
    Location
    Italy
    MS-Off Ver
    Excel 2010
    Posts
    162

    Loop trough all folders and subfolders and copy data

    Good day to everyone,

    I furthermore need your help with making code that will copy data from cell A3 (sheet table) from all excel workbooks in folders and suborders. In all folders are same workbook with different names and values in A3 so i need to do a statistic of all of them. I think the better option is to loop trough all and copy vale from A3 to the last empty row of main workbook on sheet TOTAL.


    Has anyone any idea how to do that?

    Your help will be much appreciated,

    brgds,
    forfiett

  2. #2
    Valued Forum Contributor tehneXus's Avatar
    Join Date
    04-12-2013
    Location
    Hamburg, Germany
    MS-Off Ver
    Work: MS-Office 2010 32bit @ Win8 32bit / Home: MS-Office 2016 32bit @ Win10 64bit
    Posts
    944

    Re: Loop trough all folders and subfolders and copy data

    Hi,

    please check this example: GetFromFiles.xlsm

    You'll have to adapt the main path, name of the target worksheet and name of the sheet in the workbooks to take data from. If the source sheet name is not the same a window will pop up asking you which sheet to take. This one goes without opening the workbooks, if the sheet names are different in each of the files and you do not want to select the sheet each time you'll have to open them.

    Contains:
    Please Login or Register  to view this content.
    Please use [CODE]-TAGS
    When your problem is solved mark the thread SOLVED
    If an answer has helped you please click to give reputation
    Read the FORUM RULES

  3. #3
    Forum Contributor
    Join Date
    12-13-2012
    Location
    Italy
    MS-Off Ver
    Excel 2010
    Posts
    162

    Re: Loop trough all folders and subfolders and copy data

    Good day,

    first of all many thanks for provided code.

    My next question is wahte should I do if I want to copy content from A3 to colum A, B6 to colum B, E25 to column C and R21 to column D?

    and also why I get these error:

    error.JPG
    Last edited by forfiett; 06-18-2013 at 04:32 PM.

  4. #4
    Valued Forum Contributor tehneXus's Avatar
    Join Date
    04-12-2013
    Location
    Hamburg, Germany
    MS-Off Ver
    Work: MS-Office 2010 32bit @ Win8 32bit / Home: MS-Office 2016 32bit @ Win10 64bit
    Posts
    944

    Re: Loop trough all folders and subfolders and copy data

    Hi,

    in which line does this happen, on which file does this happen?

+ 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