+ Reply to Thread
Results 1 to 2 of 2

Run macro for multiple excel files in a folder

  1. #1
    Registered User
    Join Date
    04-18-2011
    Location
    Bucharest, Romania
    MS-Off Ver
    Excel 2019
    Posts
    90

    Run macro for multiple excel files in a folder

    Hi guys, i have a macro that i need to run on many excel files. All of the files are located in the same folder.

    The macro, is a find/replace which uses data from a sheet ("sheet 2" in this case) and changes the data in "sheet 1".

    All of the excel files have only one sheet and the sheet name is the same which the nam,e of the file. For example:

    file name : 3 - 4
    sheet name : 3 - 4

    This is the macro that i use, big thanks to Leith Ross for writing it.


    Please Login or Register  to view this content.
    Also the method should allow me to change which macro I want to run.

    Thanks a lot for the help
    Last edited by ciprian; 04-30-2011 at 05:13 PM.

  2. #2
    Registered User
    Join Date
    04-18-2011
    Location
    Bucharest, Romania
    MS-Off Ver
    Excel 2019
    Posts
    90

    Re: Run macro for multiple excel files in a folder

    So i think i managed to make it work

    In the MultiReplace sub I've done some modifications

    Please Login or Register  to view this content.
    and

    Please Login or Register  to view this content.

    for the loop i've used this

    Please Login or Register  to view this content.
    the spreadsheet should be in a folder and the files you want run the macro on should be in a new folder (inside that folder)

    and now i'm able to run the find/replace macro on all my files :>
    Last edited by ciprian; 05-02-2011 at 01:23 AM. Reason: changed how the macro get's the path

+ 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