+ Reply to Thread
Results 1 to 2 of 2

Auto Copy-Paste data frm multiple excl files to 1 Excel file with Dynamic Folder name

  1. #1
    Registered User
    Join Date
    06-09-2010
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    6

    Auto Copy-Paste data frm multiple excl files to 1 Excel file with Dynamic Folder name

    Hi,

    I have an Excel Report where the raw data copy-paste needs to be automated using VBA code;

    Below is the requirement in detail:
    The location of the raw data will be changed every week; I will have to input this;

    There will be 4 subfolders in the location and 3 excel files in each subfolder; it has to pick up each one of these excel files, open relavant sheet/tab in the main report, select appropriate range, delete the existing data & then paste the new data;

    (names of sub folder & the excel files in it will remain constant)

    Can anyone help me with the above please?

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Auto Copy-Paste data frm multiple excl files to 1 Excel file with Dynamic Folder

    You can use the DIR() method to cycle through all the workbooks in a single folder and do the same copy/pastetoanotherwb process. An example of that is here:
    You can use the FSO method to cycle through all the folders in a main folder, an example of that can be found here:

    You can use this snippet of code to automate the process of picking the MAIN folder to start from:
    Please Login or Register  to view this content.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

+ 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