+ Reply to Thread
Results 1 to 15 of 15

Maco 2 Copy dynamic data from multiple worksheets into Summary worksheet in same workbook

  1. #1
    Registered User
    Join Date
    09-15-2012
    Location
    Melbourne
    MS-Off Ver
    Excel 2003
    Posts
    5

    Maco 2 Copy dynamic data from multiple worksheets into Summary worksheet in same workbook

    Hi, hoping someone will be able to assist as I am new to creating scripts and it would save me a lot of copying and pasting if a macro can do it.
    I need a macro that will copy specific data ranges from the worksheet "Asbestos Removal" through to the last worksheet in the Workbook "Working at Client's Workplace", and paste that data into a summary sheet in the same workbook.
    I need the macro to copy A1 (risk name) and then A5 to I5 (Risk Activity, Pre and Post Controls) from each worksheet in the range and paste it into the next available blank row in the summary sheet.
    The problem is that while the column range in each worksheet is static, the row range is dynamic and it has to stop and not include the data from the heading HOC Level and below.
    I have attached the worksheet to give you the basic structure in the hope that someone can help
    Attached Files Attached Files
    Last edited by abrennan; 09-15-2012 at 07:58 AM.

  2. #2
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Maco 2 Copy dynamic data from multiple worksheets into Summary worksheet in same workb

    hi abrennan, welcome to Excelforum, please check attachment, press Get Data button
    Attached Files Attached Files

  3. #3
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,520

    Re: Maco 2 Copy dynamic data from multiple worksheets into Summary worksheet in same workb

    Give this a try

    Please Login or Register  to view this content.
    Thanks,
    Mike

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved.

  4. #4
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,520

    Re: Maco 2 Copy dynamic data from multiple worksheets into Summary worksheet in same workb

    Heres your workbook

    PRA v2.xls

  5. #5
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Maco 2 Copy dynamic data from multiple worksheets into Summary worksheet in same workb

    1) I fixed the STEEL ERECTION sheet so that extra row 3 is merged back into row 2 like all the other sheets. The data now starts at row5 on all sheets.

    2) I'd recommend a self-running macro. This macro is placed into the SUMMARY module and will run itself anytime you bring the sheet up onscreen, gathering up all the info each time.
    Please Login or Register  to view this content.
    Attached Files Attached Files
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  6. #6
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,520

    Re: Maco 2 Copy dynamic data from multiple worksheets into Summary worksheet in same workb

    @Jerry

    Good catch...

  7. #7
    Registered User
    Join Date
    09-15-2012
    Location
    Melbourne
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Maco 2 Copy dynamic data from multiple worksheets into Summary worksheet in same workb

    Thank you so much Jerry and Mike. I'm blown away by your expertise and knowledge. Mike your script worked an absolute treat.
    You guys are absolutely awesome! I've been driving myself bonkers for weeks trying to work out how to do it without a macro because I dont know how to do complicated ones like this. Thank you so much for your help. Kindest regards, Annette

  8. #8
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Maco 2 Copy dynamic data from multiple worksheets into Summary worksheet in same workb

    If that takes care of your question, please select Thread Tools from the menu above and mark the thread as solved. Thanks.

  9. #9
    Registered User
    Join Date
    09-15-2012
    Location
    Melbourne
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Maco 2 Copy dynamic data from multiple worksheets into Summary worksheet in same workb

    Im not sure if I have to create a new thread or if I can add it here... (please let me know)

    I just realised that I missed a part that needed to be added to the macro you guys just did.
    The data in the the Score column (Col J) in the Summary worksheet has to be sorted according to the Risk Prioritisation - E down to L.
    The Risk Prioritisations are Low Risk (L1-5), Moderate (M6-9), High (H10-17), Extreme (E18-25).
    I thought I could just do a sort but I cant get it to do it because of the merged cells. Do you know a way around this to add into the macro?

  10. #10
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Maco 2 Copy dynamic data from multiple worksheets into Summary worksheet in same workb

    Take out the "LETTERS" so your risk prioritizations are straight numeric, then you can simply SORT the data as a whole by that column.

  11. #11
    Registered User
    Join Date
    09-15-2012
    Location
    Melbourne
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Maco 2 Copy dynamic data from multiple worksheets into Summary worksheet in same workb

    Thanks again Jerry

  12. #12
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,520

    Re: Maco 2 Copy dynamic data from multiple worksheets into Summary worksheet in same workb

    @Jerry

    Will it sort being that Columns B,C,D are merged?

  13. #13
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Maco 2 Copy dynamic data from multiple worksheets into Summary worksheet in same workb

    Probably not. Add that to the myriad of reasons to not merge cells like this in a raw data.

  14. #14
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,520
    @Annette

    See this hls
    Please Login or Register  to view this content.
    Last edited by mike7952; 09-15-2012 at 01:30 PM.

  15. #15
    Registered User
    Join Date
    09-15-2012
    Location
    Melbourne
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Maco 2 Copy dynamic data from multiple worksheets into Summary worksheet in same workb

    Absolutely agree about the merged cells. I never use them. Unfortaunately this is an inherited document and I just dont have the time to fix it.
    I created a work around with the sorting with a very crude macro which works but users will have to click on a sort button.
    I will give your script a try a bit later and see how it goes and then let you know. Thanks guys. Appreciate your help

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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