+ Reply to Thread
Results 1 to 4 of 4

Macro to pull columns of data from multiple worksheets into summary worksheets

  1. #1
    Registered User
    Join Date
    06-05-2012
    Location
    Winnipeg, Manitoba
    MS-Off Ver
    Excel 2010
    Posts
    10

    Macro to pull columns of data from multiple worksheets into summary worksheets

    Hi there,
    I know this is going to be a big ask, but I am hoping someone here can provide some guidance to help solve my issue.

    I have an Excel workbook that contains many worksheets. My goal is to pull data from each worksheet and put it into one of two summary worksheets.

    More specifically, there are two variables I am interested in pulling, Variable 3 and Variable 7. Each worksheet has a cell (B2) that indicates whether the data belongs to either a control participant or an injured participant. I want to design a macro that will put the data from each sheet into the respective summary sheet, labelled either "Control" or "Injured", based on what is listed in Cell B2. And with each subsequent worksheet, I want the data to be put into the cells adjacent to the previous data in the appropriate summary sheet.

    Lastly, I also want there to be a label for each variable, that combines the variable name with the subject's ID number found in Cell B1 for each worksheet.

    I really hope this makes sense. I have created a mock-table to give an idea of what each worksheet looks like (I made three), and what I want the summary worksheets to look like (one for control and one for injured).

    Below is what I have pieced together thus far (obviously not finished), but I am really just shooting for the stars at this point. Not even sure if I am on the right path, as this is my first foray into Excel Macros.

    Please Login or Register  to view this content.
    Thanks for any help you can provide!
    Attached Files Attached Files

  2. #2
    Forum Expert JLGWhiz's Avatar
    Join Date
    02-20-2011
    Location
    Florida, USA
    MS-Off Ver
    Windows 10, Excel 2013
    Posts
    2,070

    Re: Macro to pull columns of data from multiple worksheets into summary worksheets

    See if this works for you
    Please Login or Register  to view this content.
    Any code provided by me should be tested on a copy or a mock up of your original data before applying it to the original. Some events in VBA cannot be reversed with the undo facility in Excel. If your original post is satisfied, please mark the thread as "Solved". To upload a file, see the banner at top of this page.
    Just when I think I am smart, I learn something new!

  3. #3
    Registered User
    Join Date
    06-05-2012
    Location
    Winnipeg, Manitoba
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: Macro to pull columns of data from multiple worksheets into summary worksheets

    That is amazing. Thank you so much for putting that together! There's no way I would have figured all of that out.

    I was able to get it working with my actual data set, however I would like to figure out what everything means, as using macros seems to be something that will come in handy as I progress with my studies.

    Again, thanks for the help!

  4. #4
    Forum Expert JLGWhiz's Avatar
    Join Date
    02-20-2011
    Location
    Florida, USA
    MS-Off Ver
    Windows 10, Excel 2013
    Posts
    2,070

    Re: Macro to pull columns of data from multiple worksheets into summary worksheets

    Here is a commentd version to help you understand what is happening. BTW, the message box can be deleted, it was left in by mistake. I was using it for troubleshooting a problem I had.

    Please Login or Register  to view this content.

+ 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. MACRO to Pull Data from multiple worksheets onto a summary sheet based on an ID
    By eswonson in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-04-2013, 03:31 PM
  2. [SOLVED] Problem with macro to copy certain data from multiple worksheets into a summary worksheet
    By niftysquirrel in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 06-14-2013, 03:35 PM
  3. [SOLVED] Copy multiple worksheets data & paste into blank columns in summary worksheet
    By guest99999 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 03-21-2013, 09:56 AM
  4. I want to pull information from multiple worksheets into 1 summary worksheet
    By jacqueg in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 01-28-2013, 03:56 PM
  5. Summary page to pull data from 12 different worksheets -
    By Mhall1955 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-17-2013, 03:11 PM
  6. [SOLVED] Help with creating a macro to anaylse and pull data from multiple worksheets
    By eoghanmolloy in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 11-29-2012, 02:31 AM
  7. Pull Data from Various Worksheets into a Summary Sheet
    By shanipk82 in forum Excel General
    Replies: 1
    Last Post: 04-14-2011, 12:36 PM

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