+ Reply to Thread
Results 1 to 15 of 15

Copying data from multiple workbooks into master workbook

  1. #1
    Registered User
    Join Date
    03-23-2020
    Location
    india
    MS-Off Ver
    365
    Posts
    59

    Copying data from multiple workbooks into master workbook

    Hello,
    I have multiple macro enabled workbooks in the same folder where master file is located.
    In all workbook there is a sheet named” PR”. I want to open and copy ranges from B5:D5 up to last row containing values (non-empty cells), then it shall be pasted in master workbook in sheet (“Combined”) from the range B7:D7.
    While copying each workbook data, the values shall be pasted in master workbook in subsequent rows.
    When the data from one workbook is pasted in master sheet. Last row (B:D) shall be highlighted in yellow.
    Finally, serial numbers from 1,2,3 ect shall be provided fin master sheet from A7 onwards upto last row.

    I have attached sample files for reference.
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: Copying data from multiple workbooks into master workbook

    Try
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    03-23-2020
    Location
    india
    MS-Off Ver
    365
    Posts
    59

    Re: Copying data from multiple workbooks into master workbook

    Hi Jindon,

    it is not working.

  4. #4
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: Copying data from multiple workbooks into master workbook

    Such comment doesn't help at all.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    03-23-2020
    Location
    india
    MS-Off Ver
    365
    Posts
    59

    Re: Copying data from multiple workbooks into master workbook

    Hello Jindon,

    It was not working when i copied into module. but when i downloaded your attachments, it is copying everything perfectly. Thank you for the swift response.

    please include below requirement also

    - When the data from one workbook is pasted in master sheet. Last row (B:D) shall be highlighted in yellow.
    - Finally, serial numbers from 1,2,3 etc shall be provided fin master sheet from A7 onwards upto last row.
    Attached Files Attached Files

  6. #6
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: Copying data from multiple workbooks into master workbook

    Change to
    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    03-23-2020
    Location
    india
    MS-Off Ver
    365
    Posts
    59

    Re: Copying data from multiple workbooks into master workbook

    now the dats is pasting in master sheet from row 2 itself. actually it shall be begin with row7.please check attached sheet with new code.
    Attached Files Attached Files

  8. #8
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: Copying data from multiple workbooks into master workbook

    OMG!
    Why are you changing the format???

    Upload the workbook with before and after combined sheet.

  9. #9
    Registered User
    Join Date
    03-23-2020
    Location
    india
    MS-Off Ver
    365
    Posts
    59

    Re: Copying data from multiple workbooks into master workbook

    here it is
    Attached Files Attached Files

  10. #10
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: Copying data from multiple workbooks into master workbook

    Which code are you referring to?

    It is running as expected if you delete "x"s in row 1007.

    If you are using other code that is attached to your workbook, ask to the author.

  11. #11
    Registered User
    Join Date
    03-23-2020
    Location
    india
    MS-Off Ver
    365
    Posts
    59

    Re: Copying data from multiple workbooks into master workbook

    Hello Jindon,

    Thanks you very much. it is working as expected. I need one more help, if i have a sheet named "XXXX" instead of "PR" and the sheet is hidden in all workbook. I need to unhide and copy the data from "XXXX" and again hide "XXXX" sheet after pasting the data in master sheet.

    Can you please modify the code as per the above requirement.

  12. #12
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: Copying data from multiple workbooks into master workbook

    No need to MODIFY, just change sheet name from
    Please Login or Register  to view this content.
    to
    Please Login or Register  to view this content.

  13. #13
    Registered User
    Join Date
    03-23-2020
    Location
    india
    MS-Off Ver
    365
    Posts
    59

    Re: Copying data from multiple workbooks into master workbook

    Hi,

    It is getting run time error since "XXXX" is hidden. it is working when XXXX is not hidden. So code might need to modify in such a way that "XXXX" unhide first then copy then hide it again.

  14. #14
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: Copying data from multiple workbooks into master workbook

    My excel and yours are probably different.
    Attached Files Attached Files

  15. #15
    Registered User
    Join Date
    03-23-2020
    Location
    india
    MS-Off Ver
    365
    Posts
    59

    Re: Copying data from multiple workbooks into master workbook

    Hello Jindon,

    now everything working fine. Thanks a lot for you amazing 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. [SOLVED] VBA runtime Error. for copying cells from multiple workbooks to one master workbook.
    By mike rand in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-28-2018, 01:36 PM
  2. Copying 1 Column to Master Workbook from multiple Workbooks
    By GurminderSG in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-28-2018, 08:47 AM
  3. Help with copying data from cells in multiple workbooks to a master workbook
    By jamesh4ll in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-17-2014, 05:28 PM
  4. Copying data from multiple workbooks to 1 master workbook
    By chilli76 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-15-2014, 12:50 PM
  5. copying similar named worksheets from multiple workbooks into a master workbook
    By bradpeh in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-24-2013, 04:41 AM
  6. [SOLVED] Copying data from other workbooks and pasting into master workbook
    By jcook1100 in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 07-15-2013, 08:03 AM
  7. Replies: 1
    Last Post: 11-21-2012, 11:23 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