+ Reply to Thread
Results 1 to 12 of 12

Getting data from multiple worksheets to a master sheet

  1. #1
    Registered User
    Join Date
    08-25-2014
    Location
    Canada
    MS-Off Ver
    2013
    Posts
    9

    Getting data from multiple worksheets to a master sheet

    Hello,

    I have a task ahead of me to do the following. Create a master sheet showing when employees certifications will expire.

    We have a workbook that has sheets for every employee. On each employee worksheet there is a set of data that includes data related to certifications that people have. Course Name, Course End Date, Valid Until, Days Till Expiration, Training Facility or Institution, Course Location, Certification on File.

    I only want to display on the master sheet the rows that have a column "Days Till Expiration" < 60

    Not sure if I explained this correctly or not, any questions for additional info welcome and any help greatly appreciated.

    SR

  2. #2
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,649

    Re: Getting data from multiple worksheets to a master sheet

    Hi SmoothRider,
    Welcome to the Forum.

    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic
    Regards
    sktneer


    Treat people the way you want to be treated. Talk to people the way you want to be talked to.
    Respect is earned NOT given.

  3. #3
    Registered User
    Join Date
    08-25-2014
    Location
    Canada
    MS-Off Ver
    2013
    Posts
    9

    Re: Getting data from multiple worksheets to a master sheet

    Thanks for the welcome and reply sktneer

    I have attached a file. Basically I want a summary tab of all employees who certification are running out within the next 30,60 or 90 days. The Renewals tab is what I want to end up with at the end of the day. Let me know if you have any additional questions.

    Thanks
    Attached Files Attached Files

  4. #4
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,649

    Re: Getting data from multiple worksheets to a master sheet

    I am offering you a simple VBA solution to achieve this. I have placed a code on Renewals Sheet module for Worksheet_Activate Event. I have also modified the formula in "Days to Exp" column. To view the code right click on Renewals Sheet Tab --> View Code.

    The code will work like this. When you activate the Renewals Sheet to view its contents, the code is executed automatically and extract all the relevant data from all the sheets and when the process is completed, you will get a message "Copied Relevant Data." in the end. So you will never see the Renewals sheet empty unless there is no relevant data to be copied on the Renewals sheet.

    Please find the attached sheet to see if this works as per your requirement.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    08-25-2014
    Location
    Canada
    MS-Off Ver
    2013
    Posts
    9

    Re: Getting data from multiple worksheets to a master sheet

    You are the man sktneer, this works perfect. I have a couple of questions. I am going to be adding the rest of the employees to this so there will be 20+ more sheets added, what will I need to change in the code to make this work for everyone? I also have a few additional sheets that will be used for other data and will not be employees, how do I exclude these tabs from being calculated.

  6. #6
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,649

    Re: Getting data from multiple worksheets to a master sheet

    Thanks for the feedback.

    The code will run successfully no matter how many employee sheets you have without any problem. You just need to exclude the sheets other than employee sheets from the worksheet loop in the following line of code.......

    Please Login or Register  to view this content.
    Don't forget to write "And" between all the logical conditions and Then in the last of the logical condition.
    Hope this helps.

    If that takes care of your question, please mark your thread as Solved by selecting Thread Tools (just above your first post) --> Mark thread as solved.

  7. #7
    Registered User
    Join Date
    08-25-2014
    Location
    Canada
    MS-Off Ver
    2013
    Posts
    9

    Re: Getting data from multiple worksheets to a master sheet

    Thanks again for the reply sktneer I really appreciate it. So I have it setup like this

    Please Login or Register  to view this content.
    But I am getting a Run-time error '424' Object required error, it says its in this line of code,


    If ws.Name <> "Renewals" And ws.Name <> "Drop Down Values" And ws.Name <> "Course Instructors" And ws.Name <> "Staff Qualifications" And ws.Name <> "Technical Support Quals" And we.Name <> "Template Employee Sheet" Then

    What have I done wrong?
    Last edited by SmoothRider; 08-26-2014 at 09:42 AM.

  8. #8
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,649

    Re: Getting data from multiple worksheets to a master sheet

    Make sure that your sheet names as exactly same as listed in the code i.e. no sheet name has any leading or trailing space.

  9. #9
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,649

    Re: Getting data from multiple worksheets to a master sheet

    Moreover Your post#7 does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here



    (This thread should receive no further responses until this moderation request is fulfilled, as per Forum Rule 7)

  10. #10
    Registered User
    Join Date
    08-25-2014
    Location
    Canada
    MS-Off Ver
    2013
    Posts
    9

    Re: Getting data from multiple worksheets to a master sheet

    Thanks for the tip on how to post code properly, I found the error there was an error in one of the names.

    Thanks again for all your help, I have what I need for now. I will be sure to come back when I need something else this forum is really great for people new to advance excel like myself.

    Thanks again

    SR

  11. #11
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,649

    Re: Getting data from multiple worksheets to a master sheet

    You're welcome.

  12. #12
    Registered User
    Join Date
    08-25-2014
    Location
    Canada
    MS-Off Ver
    2013
    Posts
    9

    Re: Getting data from multiple worksheets to a master sheet

    I know I have already marked this thread as solved but am I able to ask another question related to this same code?

    If yes then here it is.

    The code is working perfect I just had 2 more asks.

    When on the Renewals tab can we have the order sorted so that we have the courses expiring with the least amount of time remaining at the top? If I just try to do a custom sort on Days to Exp it mixes all the names up and there is no way to tell who's courses are expiring.

    One other ask - is there a way to color code it so that less than 30 would be red cells, less than 60 would be yellow and less than 90 orange

    If this is to much I understand, been messing around with it and cant seems to figure it out.

    Thanks in advance.

    SR

+ 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. cross populate master sheet with data from multiple worksheets by date
    By irvinkm in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-23-2013, 12:02 PM
  2. Pull data from specific cells on multiple worksheets onto one master sheet
    By WorkforceMedia in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-07-2013, 03:25 AM
  3. Copying (but not deleting) data from a master sheet to multiple worksheets based on Col A
    By SmartBalance in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-06-2013, 03:09 PM
  4. Populate Data from Master Sheet to Multiple Worksheets
    By redheadedstepchild in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-22-2012, 04:50 PM
  5. Replies: 1
    Last Post: 07-26-2011, 02:58 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