+ Reply to Thread
Results 1 to 6 of 6

Copy multiple monthly worksheets to master sheet

  1. #1
    Registered User
    Join Date
    07-01-2011
    Location
    Australia
    MS-Off Ver
    Excel 2011 (Mac)
    Posts
    38

    Copy multiple monthly worksheets to master sheet

    Hi,

    There are lots of similar threads out there for this problem but they are just a little too different.

    I have two excel files:

    -Workbook1: Currently, varying numbers of rows of data on Monthly sheets,................. I want: to dynamically display data from all sheets in a 'master sheet' in the same workbook (ie the master always shows up-to-date data).
    -Workbook2: Has formula that will search the master sheet in the above workbook and return all rows that match a set criteria.

    The question I would like solved is: How can I append data from the sheets in Workbook1 into one sheet? All data will have the same column headings but each sheet may have anywhere from 0-150, or more, rows of data. Ideally I would like the master to be updated when new data is entered on any of the monthly sheets.

    I would prefer a formula (that I can understand and perhaps use again) rather than VBA code but if someone can meet the above requirements with VBA then I might be swayed.

    Thanks in advance...
    Attached Files Attached Files

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

    Re: Copy multiple monthly worksheets to master sheet

    I would use a Worksheet_Activate macro built into the Master sheet code module. Any time you bring that sheet up onscreen it would instantly:

    1) Delete all the current data on the master sheet
    2) Cycle through ALL other sheets and copy the data into the master to refresh everything
    3) Optionally sort by a specific column to put all the data into a more organized consolidated table


    To do this:

    1) Right click the sheet master sheet tab and select VIEW CODE
    2) Paste in this event macro:

    Please Login or Register  to view this content.
    3) Close the vbeditor and save the workbook in a macro-enabled format like *.xlsm

    Now that sheet will update itself anytime you view it from another another sheet.
    _________________
    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!)

  3. #3
    Registered User
    Join Date
    07-01-2011
    Location
    Australia
    MS-Off Ver
    Excel 2011 (Mac)
    Posts
    38

    Re: Copy multiple monthly worksheets to master sheet

    Thanks Jerry - That is a great help!!

    Is there a way to remove the recurring headers as I will be using this as a database? i.e. perhaps have the data and not the headers pasted in?

    Also - I am going to be using a formula in another workbook to search this master sheet - is there a macro I can put in the other sheet to run the above code to make sure I get the most up to date information?

    Thanks again!!

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

    Re: Copy multiple monthly worksheets to master sheet

    The headers (row1) are being copied in from the first sheet only, the macro comments point out where that is occurring, only the data from row2 down on ALL sheets is copied after that.

  5. #5
    Registered User
    Join Date
    07-01-2011
    Location
    Australia
    MS-Off Ver
    Excel 2011 (Mac)
    Posts
    38

    Re: Copy multiple monthly worksheets to master sheet

    Quote Originally Posted by JBeaucaire View Post
    The headers (row1) are being copied in from the first sheet only, the macro comments point out where that is occurring, only the data from row2 down on ALL sheets is copied after that.
    Thanks Jerry - despite this intention it seems I am getting headers copied from every sheet...

    This may belong as a separate question but...
    I am now thinking about permanently moving these sheets into another workbook - I experimented with this, but it copied the data from all sheets - which is what I was looking for in the first place!

    Can I specify a beginning and end sheet (e.g. Master sheet and a sheet called End - with no data on it?) and have the macro loop through the sheets in between?

    Also posted the question here - http://stackoverflow.com/questions/2...ts-into-master
    Last edited by Malkier; 01-15-2014 at 01:01 AM. Reason: add link

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

    Re: Copy multiple monthly worksheets to master sheet

    Yes, this would be a separate question.

+ 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. Copy/Paste Range of Data from Multiple Workbooks/Worksheets to Master Workbook/Worksheets
    By NumberCruncher311 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 02-19-2013, 08:21 PM
  2. Copy multiple worksheets into a master worksheet
    By shabbir2812 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 01-10-2013, 01:31 PM
  3. Merging multiple workbooks (with multiple worksheets) in to one master sheet
    By inkandpaint in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-22-2012, 09:46 AM
  4. Copy from different worksheets to a master sheet
    By svenk in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-25-2009, 10:21 AM
  5. Copy values from multiple worksheets onto one master sheet
    By CGBatch in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-18-2007, 04:46 AM

Tags for this Thread

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