Merge tabs from different excel macro xlsm files into one file

  • Hi all,


    I have about 20 excel macro files xlsm all containing a tab called "Freight". I need to have a new excel file (either xlsm or xlsx, I don't care) containing all "Freight" tabs from the 20 files, renamed in some way (because excel won't accept tabs with the same name). It could take cell B7 as name of the file (that field is unique).


    I have tried the solution proposed in a previous thread (https://www.ozgrid.com/forum/f…e-workbooks-into-new-file) but it's not working. I have changed the path and the file type to ".xlsm".


    I would really appreciate your help.


    Thanks!


    A.

  • What is the full path of the folder containing the 20 files? Are the 20 files the only files in that folder or are there other files in that folder as well?

    You can say "THANK YOU" for help received by clicking the "Like" icon in the bottom right corner of the helper's post.
    Practice makes perfect. I am very far from perfect so I'm still practising.

  • Open a new blank workbook. Place this macro in a regular module and save the workbook as a macro-enabled file. Run the macro.

    You can say "THANK YOU" for help received by clicking the "Like" icon in the bottom right corner of the helper's post.
    Practice makes perfect. I am very far from perfect so I'm still practising.

  • You are very welcome. :)

    You can say "THANK YOU" for help received by clicking the "Like" icon in the bottom right corner of the helper's post.
    Practice makes perfect. I am very far from perfect so I'm still practising.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!