+ Reply to Thread
Results 1 to 4 of 4

Run Macro over folder of excel files

  1. #1
    Registered User
    Join Date
    05-19-2016
    Location
    London
    MS-Off Ver
    2013
    Posts
    2

    Run Macro over folder of excel files

    I have a folder of identical excel files that act as a forms. I need to run a macro over the folder that extracts the same data from *** the files and puts them into a database.

    In the new workbook each row will be a form/file from the folder and the columns will have the information from the identical forms.

    Any help much appreciated.

    Thanks

    Mike

  2. #2
    Valued Forum Contributor spitfireblue's Avatar
    Join Date
    01-29-2015
    Location
    Adelaide, Australia
    MS-Off Ver
    2007,2010,2016
    Posts
    611

    Re: Run Macro over folder of excel files

    Hi Mike,
    Without a sample I cannot fully help you. However, here is how to loop through every file in a folder:
    Where the code has Path = you need to put the location of the folder
    Where the code has YOUR CODE HERE is where you need to add in code to copy the data from the open file to your database


    Please Login or Register  to view this content.
    Regards,
    Stephen

    If you feel someone has helped you please thank them and click on the star on their post to add reputation.
    Please ensure that you use code tags where relevant, and mark solved threads as solved.
    Most of all please be respectful and understanding of others.

  3. #3
    Registered User
    Join Date
    05-19-2016
    Location
    London
    MS-Off Ver
    2013
    Posts
    2

    Re: Run Macro over folder of excel files

    I have attached an example of the form all I need to do is extract all the cell information from blue cells and transfer to a row in a new excel sheet.
    Such that the first cell in each row of the new excel is the form file name then all the information from the blue cells are produced across the row.

    thanks for your help!
    Attached Files Attached Files

  4. #4
    Valued Forum Contributor spitfireblue's Avatar
    Join Date
    01-29-2015
    Location
    Adelaide, Australia
    MS-Off Ver
    2007,2010,2016
    Posts
    611

    Re: Run Macro over folder of excel files

    Hi Mike,

    Sorry about the delay. I must have missed this one.
    I have whipped up what I think you are after. You will need to change the location of your files and select the shape/button to run.
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Mac macro to combine all excel files in a folder
    By koosh1986 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-26-2015, 10:54 PM
  2. [SOLVED] Excel 2010 VB macro to open all files in folder and run a simple macro
    By MSFLNA in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-08-2013, 02:54 PM
  3. Run macro for multiple excel files in a folder
    By ciprian in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-30-2011, 05:12 PM
  4. Excel Macro to Copy .doc files into new folder
    By elecengr in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-22-2009, 04:24 PM
  5. [SOLVED] Excel macro to open files within a folder
    By Craig in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-08-2005, 04:05 AM
  6. Macro to copy range from Excel files in folder
    By nc in forum Excel General
    Replies: 1
    Last Post: 06-15-2005, 07:05 AM
  7. Applying a macro to all Excel-files in a folder
    By Louise in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-22-2005, 11:06 AM

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