+ Reply to Thread
Results 1 to 17 of 17

Add second sheet data of diff excel in a folder

  1. #1
    Forum Contributor
    Join Date
    03-11-2013
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    726

    Add second sheet data of diff excel in a folder

    i have diff excel files in a folder with diff name-what i want to do-i need a vba macro-by which i can add data of one excel after another-wht i am doing manually-jst made i excel and doing copy paste -after opening each excel workbook-cnt it be autmated..

    i want that some vba macro jst pck data of sheet 2 of everywook-jst after another ....

  2. #2
    Forum Contributor
    Join Date
    03-11-2013
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    726

    Re: Add second sheet data of diff excel in a folder

    Shall i explain it further-i was to merge the data of all xlsx file in a folder in a singl xlsx file-but for there second sheet only-and data will be merged vertically-i mean paste next data below row wise....

  3. #3
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2404 Win 11 Home 64 Bit
    Posts
    23,855

    Re: Add second sheet data of diff excel in a folder

    You have not clearly explained your issue. I urge you to not use texting language in this forum. Not everyone understands what you are saying. Using complete English sentences enhances the solving of your problem. Additionally, your explanations are not clear. Suggest you provide examples of what you have and what you expect for an outcome. Perhaps some sample data with your explanation would encourage others to respond.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  4. #4
    Forum Contributor
    Join Date
    03-11-2013
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    726

    Re: Add second sheet data of diff excel in a folder

    Add second sheet data of diff excel in a folder
    Attached Files Attached Files

  5. #5
    Forum Contributor
    Join Date
    03-11-2013
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    726

    Re: Add second sheet data of diff excel in a folder

    I have workbooks like A , B .....Etc in a folder-two sample files are attached-result file is also attached..

  6. #6
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2404 Win 11 Home 64 Bit
    Posts
    23,855

    Re: Add second sheet data of diff excel in a folder

    Here is some generic code to loop through a known folder and open each file and copy the data from a specified sheet and then paste into a master file. Change up the code as needed to meet your specific case.

    Please Login or Register  to view this content.

  7. #7
    Forum Contributor
    Join Date
    03-11-2013
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    726

    Re: Add second sheet data of diff excel in a folder

    snap shot of run time error is aatched kindly assist:

    the code which i am using as you suggested sir:

    Please Login or Register  to view this content.
    here in red line it says to debugg
    Attached Images Attached Images
    Last edited by ROHAN999; 04-19-2015 at 02:19 AM. Reason: code is not wrapped

  8. #8
    Forum Contributor
    Join Date
    03-11-2013
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    726

    Re: Add second sheet data of diff excel in a folder

    Please Login or Register  to view this content.

  9. #9
    Forum Contributor
    Join Date
    03-11-2013
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    726

    Re: Add second sheet data of diff excel in a folder

    Workbooks.Open (MyFile)


    here it says to debugg sir

    snap shot of run time error is aatched kindly assist:

    the code which i am using as you suggested sir:

    snapshot.jpg

  10. #10
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2404 Win 11 Home 64 Bit
    Posts
    23,855

    Re: Add second sheet data of diff excel in a folder

    Potential issues: http://www.runtimeerrorsfix.com/how-...rror-1004.html

    Potential Issues: http://webmasterfacts.com/runtime-error-1004/

    Read Post 11 here: http://www.mrexcel.com/forum/excel-q...or-1004-a.html

    Potential Issues: http://www.speedypc.com/articles/fix...error1004.aspx

    It appears from these documents, that there may be an issue with your PC. Read through and see if any of the solutions offered fix your issue. It is not a coding issue.

  11. #11
    Forum Contributor
    Join Date
    03-11-2013
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    726

    Re: Add second sheet data of diff excel in a folder

    No sir i have tried everything-also tried on various other computers too-the same error persist-kindly help-plz check it at your end by making a folder with name "CLUB MASTER" in d drive and then save the three files attached by me-in that folder and check the same error comes or not? Plzzz..

  12. #12
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2404 Win 11 Home 64 Bit
    Posts
    23,855

    Re: Add second sheet data of diff excel in a folder

    Will be travelling for the next week. Will not have time to analyze. Hopefully, someone else may jump in. If not, I will explore at the end of travels or as time permits.

  13. #13
    Forum Contributor
    Join Date
    03-11-2013
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    726

    Re: Add second sheet data of diff excel in a folder

    Anybody else kindly assist-I am making folder in d drive with the name "Club Master" ,pasted all my xls files into it-from which i want to copy data-then using this code -as said above-wht is wrng-why this error is cming-my project is imp and i have 1543 files-plz assist.

  14. #14
    Forum Contributor
    Join Date
    03-11-2013
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    726

    Re: Add second sheet data of diff excel in a folder

    Anybody-any idea-what is going wrong-any other way or something.

  15. #15
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Add second sheet data of diff excel in a folder

    Hello ROHAN999,

    I have added the macro below which has tested on the files you provided to the attached workbook. Change the folder in the macro to where your files are saved.

    Module1 macro code
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  16. #16
    Forum Contributor
    Join Date
    03-11-2013
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    726

    Re: Add second sheet data of diff excel in a folder

    thnx alot sir

  17. #17
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Add second sheet data of diff excel in a folder

    Hello ROHAN999,

    You're welcome. Glad I could help.

+ 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. Replies: 6
    Last Post: 08-28-2014, 02:44 AM
  2. Replies: 4
    Last Post: 12-11-2013, 04:13 AM
  3. [SOLVED] Move coulumns data of a sheet to diff other columns of other sheet in same workbook
    By ROHAN999 in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 09-03-2013, 09:22 AM
  4. [SOLVED] Append the data given in diff sheets of an Excel File to one sheet
    By sansk_23 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-09-2005, 09:06 PM
  5. Replies: 0
    Last Post: 01-13-2005, 06:49 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