Results 1 to 2 of 2

Thread: Combine worksheet one after another from folder

  1. #1
    Junior Member
    Join Date
    Oct 2016
    Posts
    3
    Rep Power
    0

    Combine worksheet one after another from folder

    i have 60 workbook in a folder, then i want to select 2 workbook for merging one after another ie:- 2 sheets one after another not in one worksheet, hence finally 30 workbook with 2 sheets each and the name of the worksheet can be preserve


    eg:- i have test.xlsx & test1.xlsx final result in newexcel.xlsx ie:- newexcel.xlsx in sheet1 & test1.xlsx in sheet2

    can it be done

    i have post the same on other forum

    https://www.mrexcel.com/forum/excel-...er-folder.html

  2. #2
    Fuhrer, Vierte Reich DocAElstein's Avatar
    Join Date
    Aug 2014
    Posts
    9,270
    Rep Power
    10
    Hi sachin482,
    Quote Originally Posted by sachin482 View Post
    ...can it be done...
    It can almost certainly be done , and there are probably many ways to do it.

    Here some general help to get you started:
    _1) I would probably start by reading up on the
    VBA Dir Function
    Try a search with something like " Dir Function Loop Through all Files in a Folder VBA "
    You can easily loop through all the files in a Folder using the Dir Function

    _2) Then I would use the macro recorder to open two of your files , open a new File, and do all the operations that you wish to do.

    It should then be fairly easy to modify the code which the macro recording gives you such that it does exactly what you want to do

    _..........................................

    For more specific help,

    _(i) Upload two typical Files ( Desensitize the data if necessary ).
    _(ii) Explain again in as much detail as you can, exactly what you want the code to do.
    Alan
    Last edited by DocAElstein; 02-03-2018 at 05:21 PM.
    ….If you are my competitor, I will try all I can to beat you. But if I do, I will not belittle you. I will Salute you, because without you, I am nothing.
    If you are my enemy, we will try to kick the fucking shit out of you…..
    Winston Churchill, 1939
    Save your Forum..._
    _...KILL A MODERATOR!!

Similar Threads

  1. COMBINE AND OR with IF Function in Single Formula
    By analyst in forum Excel Help
    Replies: 4
    Last Post: 03-26-2014, 05:17 PM
  2. Combine two IF AND formula
    By analyst in forum Excel Help
    Replies: 0
    Last Post: 03-26-2014, 11:50 AM
  3. Replies: 2
    Last Post: 11-10-2013, 11:48 PM
  4. Replies: 1
    Last Post: 02-14-2013, 12:09 PM
  5. Find Parent Folder From Given Folder / File Path
    By Excel Fox in forum Excel and VBA Tips and Tricks
    Replies: 1
    Last Post: 05-28-2011, 03:50 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •