+ Reply to Thread
Results 1 to 36 of 36

How do I set up a master sheet in a workbook that compiles data from the other sheets?

  1. #1
    Registered User
    Join Date
    01-26-2016
    Location
    Farmington, NM
    MS-Off Ver
    365
    Posts
    20

    How do I set up a master sheet in a workbook that compiles data from the other sheets?

    I have a workbook with multiple sheets that track inputted data and what their status is (i.e. Open or Closed). I would like to make a master sheet that would import data from each of these sheets automatically. In particular, I want the sheet to only import and display the "open" files. I also only need to apply this to 5 of the worksheets in my workbook.

    I've attached a modified version of my workbook so that you can see what I'm trying to accomplish. Ultimately, the master sheet would look identical to my other sheets just without the closed or canceled items.

    Thanks for helping me with my problem.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    11-28-2012
    Location
    Guatemala
    MS-Off Ver
    Excel 2010
    Posts
    2,394

    Re: How do I set up a master sheet in a workbook that compiles data from the other sheets?

    Please Login or Register  to view this content.

  3. #3
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: How do I set up a master sheet in a workbook that compiles data from the other sheets?

    Welcome to the forum.

    Here is a similar question and I supplied a formula solution. In this case, 6 worksheets were combined into a master and any additions to the sub sheets would automatically update the master worksheet.
    http://www.excelforum.com/excel-gene...ml#post4299858

    Take a look at the workbook uploaded and you should be able to adapt it to suit your data.
    Attached Files Attached Files
    Last edited by newdoverman; 01-26-2016 at 08:37 PM.
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

  4. #4
    Registered User
    Join Date
    01-25-2016
    Location
    guelph
    MS-Off Ver
    2013
    Posts
    3

    Re: How do I set up a master sheet in a workbook that compiles data from the other sheets?

    you can also just define your data in the other sheets and type in the defined name on your master sheet. highlight the rows or columns you need data from then right click and hit define name type what you want to call it. when on master sheet just type whatever you called it and the data will be there. its easier than doing columns or rows formulas because it can be both or just one, really whatever you need.

  5. #5
    Registered User
    Join Date
    01-26-2016
    Location
    Farmington, NM
    MS-Off Ver
    365
    Posts
    20

    Re: How do I set up a master sheet in a workbook that compiles data from the other sheets?

    This code is great and is almost a perfect fit for my application. I'm played with it and modified it slightly. There are two things that I would like it to do for me and cant quiet figure it out. The first is I would like it to import the data in ascending order, basically start with 2012 at the top and go to the newest additions at the bottom. The other thing is when the "open" is changed to "closed" on the other sheets it removes that line from the master. Are there a couple of lines that I can add to make this work?

  6. #6
    Registered User
    Join Date
    01-26-2016
    Location
    Farmington, NM
    MS-Off Ver
    365
    Posts
    20

    Re: How do I set up a master sheet in a workbook that compiles data from the other sheets?

    Quote Originally Posted by rcm View Post
    Please Login or Register  to view this content.

    This code is great and is almost a perfect fit for my application. I'm played with it and modified it slightly. There are two things that I would like it to do for me and cant quiet figure it out. The first is I would like it to import the data in ascending order, basically start with 2012 at the top and go to the newest additions at the bottom. The other thing is when the "open" is changed to "closed" on the other sheets it removes that line from the master. Are there a couple of lines that I can add to make this work?

  7. #7
    Registered User
    Join Date
    01-26-2016
    Location
    Farmington, NM
    MS-Off Ver
    365
    Posts
    20

    Re: How do I set up a master sheet in a workbook that compiles data from the other sheets?

    Quote Originally Posted by jonnyboy26 View Post
    you can also just define your data in the other sheets and type in the defined name on your master sheet. highlight the rows or columns you need data from then right click and hit define name type what you want to call it. when on master sheet just type whatever you called it and the data will be there. its easier than doing columns or rows formulas because it can be both or just one, really whatever you need.

    I had started to go through this process but it was becoming quiet tedious simply due to the size of my actual workbook and number of definitions I was having to put in. Thanks for the response.

  8. #8
    Registered User
    Join Date
    01-26-2016
    Location
    Farmington, NM
    MS-Off Ver
    365
    Posts
    20

    Re: How do I set up a master sheet in a workbook that compiles data from the other sheets?

    Quote Originally Posted by newdoverman View Post
    Welcome to the forum.

    Here is a similar question and I supplied a formula solution. In this case, 6 worksheets were combined into a master and any additions to the sub sheets would automatically update the master worksheet.
    http://www.excelforum.com/excel-gene...ml#post4299858

    Take a look at the workbook uploaded and you should be able to adapt it to suit your data.
    Thanks for the reply. I went to the original post and copied the formulas that you suggested. I'm trying those in my workbook to see which works better for me, this or the VBA.

  9. #9
    Forum Expert
    Join Date
    11-28-2012
    Location
    Guatemala
    MS-Off Ver
    Excel 2010
    Posts
    2,394

    Re: How do I set up a master sheet in a workbook that compiles data from the other sheets?

    could you send the modified version?

  10. #10
    Registered User
    Join Date
    01-26-2016
    Location
    Farmington, NM
    MS-Off Ver
    365
    Posts
    20

    Re: How do I set up a master sheet in a workbook that compiles data from the other sheets?

    Quote Originally Posted by rcm View Post
    could you send the modified version?

    The only thing pertinent in the modification at this point is the rows. I changed from 2 to 3 to account for my header when I put it on the new sheet.

    Sub openjobs()

    Set mst = Sheets("CAF Open Master")

    r3 = mst.Range("A" & Rows.Count).End(xlUp).Row + 1
    mst.Range("3:" & r3).ClearContents
    r3 = 3

    For s = 2 To Sheets.Count
    Set Shin = Sheets(s)
    rmax = Shin.Range("A" & Rows.Count).End(xlUp).Row
    For r = 3 To rmax
    If Shin.Cells(r, 10) = "Open" Then
    Shin.Select
    Rows(r & ":" & r).Select
    Selection.Copy
    mst.Select
    Rows(r3 & ":" & r3).Select

    ActiveSheet.Paste
    r3 = r3 + 1
    End If

    Next r
    Next s

    mst.Select
    Cells.Select
    Cells.EntireColumn.AutoFit
    End Sub

  11. #11
    Registered User
    Join Date
    01-26-2016
    Location
    Farmington, NM
    MS-Off Ver
    365
    Posts
    20

    Re: How do I set up a master sheet in a workbook that compiles data from the other sheets?

    Forgive me for being a complete VBA novice. And Forgive me if I'm asking for to much here. And I promise I have actually attempted to modify and add to the code you wrote to try and achieve what I'm about to ask for.
    First, How can I get this to only scan certain sheets? I have other sheets in this workbook that no longer have any "open" listings but it still scans them.
    Second, I can't get the sheet to sort ascending because of something having to do with merged cells and I have done everything it has asked me from making them the same size to unmerging. The only way at this point to get it to fill the data in the order I want is to rearrange my sheets.
    Third, I am putting in a total cell at the bottom and I want it to continue to move up or down as jobs are added or closed and removed.
    Lastly, can I add a button of some kind on the master sheet so that I can run my macro so that it up dates with out having to run it in ALT F11?

    Again, I appreciate your assistance.

  12. #12
    Forum Expert
    Join Date
    11-28-2012
    Location
    Guatemala
    MS-Off Ver
    Excel 2010
    Posts
    2,394

    Re: How do I set up a master sheet in a workbook that compiles data from the other sheets?

    1. Only scan certain sheets

    One way is to rename those sheets (the macro could do it after the condition is met) and modify the macro to only scan the sheets that meet a certain pattern in the names.

    2.Arrange sheets in ascending order by date.

    How about sorting the jobs after they are inserted in the master file

    3. Total cell at the bottom.

    The most efficient way is to have the total row at the beginning. The moving total can be done too.

    4. Add a button

    Considered it done

  13. #13
    Registered User
    Join Date
    01-26-2016
    Location
    Farmington, NM
    MS-Off Ver
    365
    Posts
    20

    Re: How do I set up a master sheet in a workbook that compiles data from the other sheets?

    Quote Originally Posted by rcm View Post
    1. Only scan certain sheets

    One way is to rename those sheets (the macro could do it after the condition is met) and modify the macro to only scan the sheets that meet a certain pattern in the names.

    2.Arrange sheets in ascending order by date.

    How about sorting the jobs after they are inserted in the master file

    3. Total cell at the bottom.

    The most efficient way is to have the total row at the beginning. The moving total can be done too.

    4. Add a button

    Considered it done
    That is awesome, I look forward to seeing the new code and implementing it. Thanks in advance!

  14. #14
    Forum Expert
    Join Date
    11-28-2012
    Location
    Guatemala
    MS-Off Ver
    Excel 2010
    Posts
    2,394

    Re: How do I set up a master sheet in a workbook that compiles data from the other sheets?

    try this version, most of the requirement are there..
    Attached Files Attached Files

  15. #15
    Forum Expert
    Join Date
    11-28-2012
    Location
    Guatemala
    MS-Off Ver
    Excel 2010
    Posts
    2,394

    Re: How do I set up a master sheet in a workbook that compiles data from the other sheets?

    I supressed the anoying screen updating in this version

  16. #16
    Forum Expert
    Join Date
    11-28-2012
    Location
    Guatemala
    MS-Off Ver
    Excel 2010
    Posts
    2,394

    Re: How do I set up a master sheet in a workbook that compiles data from the other sheets?

    this version sorry
    Attached Files Attached Files

  17. #17
    Registered User
    Join Date
    01-26-2016
    Location
    Farmington, NM
    MS-Off Ver
    365
    Posts
    20

    Re: How do I set up a master sheet in a workbook that compiles data from the other sheets?

    Quote Originally Posted by rcm View Post
    this version sorry
    That is nice. The button makes it really nice to run and suppressing the update annoyingness is brilliant. So I tried adding an "Open" line in 2016 but it didn't pick it up when I ran it. Is that because the code reads no opens?

  18. #18
    Registered User
    Join Date
    01-26-2016
    Location
    Farmington, NM
    MS-Off Ver
    365
    Posts
    20

    Re: How do I set up a master sheet in a workbook that compiles data from the other sheets?

    Quote Originally Posted by asupharris View Post
    That is nice. The button makes it really nice to run and suppressing the update annoyingness is brilliant. So I tried adding an "Open" line in 2016 but it didn't pick it up when I ran it. Is that because the code reads no opens?
    Something else that I noticed, when I apply my header to the master, if it is below the button it gets erased and if I put it above the button the code errors out saying it cant do that to a merged cell.

  19. #19
    Forum Expert
    Join Date
    11-28-2012
    Location
    Guatemala
    MS-Off Ver
    Excel 2010
    Posts
    2,394

    Re: How do I set up a master sheet in a workbook that compiles data from the other sheets?

    So how about not bother with the exclution. Have the macro check all of them anyway. Otherwise, it would require to write another macro to monitor the event of inputting and open line.

  20. #20
    Registered User
    Join Date
    01-26-2016
    Location
    Farmington, NM
    MS-Off Ver
    365
    Posts
    20

    Re: How do I set up a master sheet in a workbook that compiles data from the other sheets?

    Yeah, I can live with that. It doesn't take that much longer to check them. In the actual workbook the years go all the way back to 2003 and there are no open lines until 2012 but 2016 and future years will be filling up with Open lines.

  21. #21
    Forum Expert
    Join Date
    11-28-2012
    Location
    Guatemala
    MS-Off Ver
    Excel 2010
    Posts
    2,394

    Re: How do I set up a master sheet in a workbook that compiles data from the other sheets?

    I turned in to comments 3 lines (2 conditional if statemets and their corresponding ending lines) so it will check all the tabs regardless...
    Attached Files Attached Files
    Last edited by rcm; 01-28-2016 at 06:30 PM. Reason: clarity

  22. #22
    Registered User
    Join Date
    01-26-2016
    Location
    Farmington, NM
    MS-Off Ver
    365
    Posts
    20

    Re: How do I set up a master sheet in a workbook that compiles data from the other sheets?

    Got a compile error, Next without for. Not sure what that means.

  23. #23
    Forum Expert
    Join Date
    11-28-2012
    Location
    Guatemala
    MS-Off Ver
    Excel 2010
    Posts
    2,394

    Re: How do I set up a master sheet in a workbook that compiles data from the other sheets?

    My mistake, I commented (by adding a ' to the line) the wrong END IF .
    Attached Files Attached Files

  24. #24
    Registered User
    Join Date
    01-26-2016
    Location
    Farmington, NM
    MS-Off Ver
    365
    Posts
    20

    Re: How do I set up a master sheet in a workbook that compiles data from the other sheets?

    Unfortunately it was still doing the same thing. So I played with it a little and now it seems to work. So what I did, (shot in the dark going by your comment), I removed the ' on the END IF above Next r and added it to the END IF above Next s. So it looks like this.
    End If

    Next r

    ' If opn = 0 Then Sheets(s).Name = Left(Sheets(s).Name, 8) & "noopens"
    ' End If
    Next s

    Hopefully that doesn't mess up anything. I was able to add a line on 2016, hit the button on the master and it added it, I then went back and closed it and it took it away. I'm going to try moving the button up to the A1 position and adding my header to rows 2 and 3 and see if it works or if it erases it.

  25. #25
    Registered User
    Join Date
    01-26-2016
    Location
    Farmington, NM
    MS-Off Ver
    365
    Posts
    20

    Re: How do I set up a master sheet in a workbook that compiles data from the other sheets?

    Unfortunately it was still doing the same thing. So I played with it a little and now it seems to work. So what I did, (shot in the dark going by your comment), I removed the ' on the END IF above Next r and added it to the END IF above Next s. So it looks like this.
    End If

    Next r

    ' If opn = 0 Then Sheets(s).Name = Left(Sheets(s).Name, 8) & "noopens"
    ' End If
    Next s

    Hopefully that doesn't mess up anything. I was able to add a line on 2016, hit the button on the master and it added it, I then went back and closed it and it took it away. I'm going to try moving the button up to the A1 position and adding my header to rows 2 and 3 and see if it works or if it erases it.

  26. #26
    Registered User
    Join Date
    01-26-2016
    Location
    Farmington, NM
    MS-Off Ver
    365
    Posts
    20

    Re: How do I set up a master sheet in a workbook that compiles data from the other sheets?

    Something else that just happened. I went through and changed one open line to closed on each sheet and added an open line to the 2016 sheet and then hit the button. It took away all of the ones I changed to closed but didn't add the open one.
    Still wont let me add the header below the button as it erases it when you run the script and if I put it above it gives me a merged cell error and the debugger highlights this.
    r2 = mst.Range("A" & Rows.Count).End(xlUp).Row + 1
    mst.Range("2:" & r2).ClearContents
    r2min = 4
    r2 = r2min
    Last edited by asupharris; 01-29-2016 at 10:58 AM.

  27. #27
    Forum Expert
    Join Date
    11-28-2012
    Location
    Guatemala
    MS-Off Ver
    Excel 2010
    Posts
    2,394

    Re: How do I set up a master sheet in a workbook that compiles data from the other sheets?

    I went through the motions and this version seems to work.

    Remember it is a brute force macro.
    It clears the MASTER and then sweeps all tabs and all lines looking for OPENS
    Attached Files Attached Files

  28. #28
    Registered User
    Join Date
    01-26-2016
    Location
    Farmington, NM
    MS-Off Ver
    365
    Posts
    20

    Re: How do I set up a master sheet in a workbook that compiles data from the other sheets?

    Ok, I'm at a loss as to what I am doing wrong. I tried applying the script to the real workbook and it doesn't want to work. Here is the workbook that I am trying to apply it to.
    Attached Files Attached Files

  29. #29
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: How do I set up a master sheet in a workbook that compiles data from the other sheets?

    Maybe this will help. I tried to convert my original posting to your actual file. There were several problems including merged cells and columns that didn't match up from one year to the next at around 2008 or 2009.
    Attached Files Attached Files

  30. #30
    Registered User
    Join Date
    01-26-2016
    Location
    Farmington, NM
    MS-Off Ver
    365
    Posts
    20

    Re: How do I set up a master sheet in a workbook that compiles data from the other sheets?

    Sorry for the late reply, got sidelined on a couple of other projects. Looks awesome, so is there a way to remove the closed items from the master sheet and add the button back in?

  31. #31
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: How do I set up a master sheet in a workbook that compiles data from the other sheets?

    If you are referring to the workbook that I uploaded, you can select all the data including headers then on the Data tab click on the filter button. That will add filters to the columns. click on the filter button on the Current Status column and uncheck "Closed".

  32. #32
    Registered User
    Join Date
    01-26-2016
    Location
    Farmington, NM
    MS-Off Ver
    365
    Posts
    20

    Re: How do I set up a master sheet in a workbook that compiles data from the other sheets?

    Quote Originally Posted by newdoverman View Post
    If you are referring to the workbook that I uploaded, you can select all the data including headers then on the Data tab click on the filter button. That will add filters to the columns. click on the filter button on the Current Status column and uncheck "Closed".
    Very cool, I applied that and it looks about like I want. I tried playing with it and seeing if adding new open ones on the 2016 sheet would update on the master and it didn't. Is there something that I need to apply to it to have it do that?

  33. #33
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: How do I set up a master sheet in a workbook that compiles data from the other sheets?

    Sorry, I made a small error on 'CAF Tracking 2016'!A3
    The formula should read as follows and be filled down the column. Once you change this and fill down, the Master worksheet will automatically pick up the new entries. Start your data entry in column B and don't over-write the formulae in column A.
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Just to be sure that you get it correct, I enclose the workbook with the above change.
    Attached Files Attached Files

  34. #34
    Registered User
    Join Date
    01-26-2016
    Location
    Farmington, NM
    MS-Off Ver
    365
    Posts
    20

    Re: How do I set up a master sheet in a workbook that compiles data from the other sheets?

    Sweet, That is great. Thanks for the help. Now I need to go through all of the formula and learn what you did so that I can apply it in the future to other documents.

  35. #35
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: How do I set up a master sheet in a workbook that compiles data from the other sheets?

    Thank you for the feedback.

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

  36. #36
    Registered User
    Join Date
    01-26-2016
    Location
    Farmington, NM
    MS-Off Ver
    365
    Posts
    20

    Re: How do I set up a master sheet in a workbook that compiles data from the other sheets?

    Thanks, I will do that. Thanks again to everyone who helped me out on this. Everything that came through was very beneficial!

+ 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] Auto-Populate Data to Master Sheet from Other Sheets in Workbook
    By datutt in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-30-2015, 05:36 PM
  2. [SOLVED] Copy data from master sheet in workbook to monthly sheets
    By joserborges in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 03-27-2014, 09:24 PM
  3. Autofill data from 2 sheets to master sheet in a workbook
    By remlap511 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-03-2013, 02:04 PM
  4. Creating a master sheet using data from other sheets in the workbook.
    By Chaos247 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-22-2013, 07:57 AM
  5. Linking Cells from Master sheet to data sheets in workbook
    By Ag Research in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 02-15-2013, 04:42 AM
  6. [SOLVED] Populate Master Sheet with data from other sheets in workbook...
    By DMA-Pacific in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-18-2013, 01:21 AM
  7. [SOLVED] Split master sheet data to multiple sheets in same workbook
    By Apple Ling in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-26-2012, 10:39 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