Results 1 to 2 of 2

Thread: Combine worksheet one after another from folder

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Junior Member
    Join Date
    Oct 2016
    Posts
    1
    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
    Senior Member DocAElstein's Avatar
    Join Date
    Aug 2014
    Posts
    321
    Rep Power
    3
    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
    Google first, like this site:ExcelFox.com "Short Title or Theme of wot you’re looking for"
    Use Code Tags: Highlight code; click on the # icon above,
    Post screenshots COPYABLE to a Spredsheet; NOT IMAGES PLEASE:
    Tools for that:
    http://www.excelfox.com/forum/showth...=9821#post9821
    https://app.box.com/s/gjpa8mk8ko4vkwcke3ig2w8z2wkfvrtv
    http://excelmatters.com/excel-forums/

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:47 PM
  2. Combine two IF AND formula
    By analyst in forum Excel Help
    Replies: 0
    Last Post: 03-26-2014, 12:20 PM
  3. Replies: 2
    Last Post: 11-11-2013, 12:18 AM
  4. Replies: 1
    Last Post: 02-14-2013, 12:39 PM
  5. Find Parent Folder From Given Folder / File Path
    By Excel Fox in forum Excel Tips and Tricks
    Replies: 1
    Last Post: 05-28-2011, 04:20 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
  •