+ Reply to Thread
Results 1 to 13 of 13

Transfer rows of data from multiple workbooks to master workbook based on value in row

  1. #1
    Registered User
    Join Date
    04-16-2014
    Location
    Pennsylvania
    MS-Off Ver
    Excel 2013
    Posts
    7

    Transfer rows of data from multiple workbooks to master workbook based on value in row

    Hello all,

    I'm a bit of a self taught excel user, so my advanced knowledge is a bit limited. I have created timesheets for employees that work in our shop. Our company manufactures products for different industries, such as mining, wind power generation, general industrial applications, and so forth. I modified some time sheet templates I found for excel to accommodate our company's actions. Each employee has their own workbook, in which the months are separated into different worksheets. Each sheet is divided further into weeks and in each weekly section the areas of information are divided as follows:

    A / B / C / D / E / F / G / H / I / J / K / L / M
    Work Sector / Workshop or Fieldservice / Scope of Work / Job # / Reg or OT / Mon / Tue / Wed / Thu / Fri / Sat / Sun / Total

    There are 7 workbooks (one for each employee), each with 12 sheets (one for each month). I want to create a master sheet that will pull information from everyone's timesheet if they worked on a particular job. In other words, I would like to type a job number into a cell, then have excel look through everyone's timesheets and pull over only the rows of information that contain that job number.

    I have been searching and could not find any advice on this subject. Please let me know if this is possible. Thank you in advance for any help.

  2. #2
    Forum Expert
    Join Date
    10-09-2012
    Location
    Dallas, Texas
    MS-Off Ver
    MO 2010 & 2013
    Posts
    3,049

    Re: Transfer rows of data from multiple workbooks to master workbook based on value in row

    This is possible with VBA.

    Typically what I do, mostly because I am so new with VBA, is break down what I want to accomplish in a few steps.

    For Example:
    1) I will create a macro to pull in all the names of workbooks in a folder
    2) Create a processor to pull the workbook data in, one tab at a time
    3) Process the imported tab then paste/append to a DATA tab of some sort

    Basically pull the data in, process it, then append it and drop it in the model.
    Please ensure you mark your thread as Solved once it is. Click here to see how.
    If a post helps, please don't forget to add to our reputation by clicking the star icon in the bottom left-hand corner of a post.

  3. #3
    Forum Expert
    Join Date
    10-09-2012
    Location
    Dallas, Texas
    MS-Off Ver
    MO 2010 & 2013
    Posts
    3,049

    Re: Transfer rows of data from multiple workbooks to master workbook based on value in row

    Also dont bother typing in some explanation of your dataset, always post a sample workbook.

    As for your particular issues, it seems you want to pull all the data in, append it into ONE data source then have some sort of reporting tab that references the data source.
    Is this correct?

    Are all of the files exactly the same, are all of the tabs exactly the same?

  4. #4
    Registered User
    Join Date
    04-16-2014
    Location
    Pennsylvania
    MS-Off Ver
    Excel 2013
    Posts
    7

    Re: Transfer rows of data from multiple workbooks to master workbook based on value in row

    Quote Originally Posted by mikeTRON View Post
    Also dont bother typing in some explanation of your dataset, always post a sample workbook.

    As for your particular issues, it seems you want to pull all the data in, append it into ONE data source then have some sort of reporting tab that references the data source.
    Is this correct?

    Are all of the files exactly the same, are all of the tabs exactly the same?
    Thank you for the reply Mike,

    My apologies, I have attached an example.

    As you can see, I would like to pull the information from rows only if the row contains a particular job # that can be input to a cell in a master file. So we could have 5 different employees working on the same job at different dates and putting different amount of hours into the job. Each employee's spreadsheet is exactly the same format with the tables in exactly the same format. So once again, I would like to have excel look through each employee's sheet and each tab (save the last tab since it is only a yearly overview for each employee), and pull over the rows of information that contain a specific job number that you can input into the master sheet. All the rows should populate in the master sheet so that total hours for the job and further division of those hours can be done from the master file. Let me know if this answers your questions. Thank you again sir.


    Joe Smith.xlsx

  5. #5
    Registered User
    Join Date
    04-16-2014
    Location
    Pennsylvania
    MS-Off Ver
    Excel 2013
    Posts
    7

    Re: Transfer rows of data from multiple workbooks to master workbook based on value in row

    Still looking for advise on this subject. I have very limited knowledge of VBA, any suggestions would help immensely. Thanks again.

  6. #6
    Forum Expert
    Join Date
    10-09-2012
    Location
    Dallas, Texas
    MS-Off Ver
    MO 2010 & 2013
    Posts
    3,049

    Re: Transfer rows of data from multiple workbooks to master workbook based on value in row

    Where is the data in this tab?

    Like I previously said I would pull ALL of the data in to a tab then process it by purging the rows you dont need and then reporting should be fairly straight forward.

  7. #7
    Registered User
    Join Date
    04-16-2014
    Location
    Pennsylvania
    MS-Off Ver
    Excel 2013
    Posts
    7

    Re: Transfer rows of data from multiple workbooks to master workbook based on value in row

    If you look at each month, there are different sections for each week. In each weekly section, they fill out a row of information that pertains to a job that they are working on. So for example, look at March week 10. In my master spreadsheet I would type in the job # L40009 and it would pull over the rows of information in Joe's spreadsheet that contain that job number. I would like it to pull over all the columns between A and M for each row containing this job #. So in March week 10 alone, the master sheet would pull over rows 47, 48, 49, 52, and 53. But in the grand scheme of things, the program would look through every week of every month in everyone's timesheet and pull over the rows of information. Let me know if this makes sense or if I confused things further.

  8. #8
    Forum Expert
    Join Date
    10-09-2012
    Location
    Dallas, Texas
    MS-Off Ver
    MO 2010 & 2013
    Posts
    3,049

    Re: Transfer rows of data from multiple workbooks to master workbook based on value in row

    Can you post a sample workbook with sample data that shows raw data, and where you want it to end up? I am having trouble reading everything, I prefer to see it in excel and understand it in that manner.

  9. #9
    Registered User
    Join Date
    04-16-2014
    Location
    Pennsylvania
    MS-Off Ver
    Excel 2013
    Posts
    7

    Re: Transfer rows of data from multiple workbooks to master workbook based on value in row

    i Already Posted The Sample Previously. Its Called JohnSmith

  10. #10
    Registered User
    Join Date
    04-16-2014
    Location
    Pennsylvania
    MS-Off Ver
    Excel 2013
    Posts
    7

    Re: Transfer rows of data from multiple workbooks to master workbook based on value in row

    Sorry, JoeSmith.xlsx

  11. #11
    Forum Expert
    Join Date
    10-09-2012
    Location
    Dallas, Texas
    MS-Off Ver
    MO 2010 & 2013
    Posts
    3,049

    Re: Transfer rows of data from multiple workbooks to master workbook based on value in row

    Yeah but I cant follow where you want things to end up and from where. What specific cells are you wanting formulas for?

  12. #12
    Registered User
    Join Date
    04-16-2014
    Location
    Pennsylvania
    MS-Off Ver
    Excel 2013
    Posts
    7

    Re: Transfer rows of data from multiple workbooks to master workbook based on value in row

    The data I want pulled I clarified another earlier post. Consider the master workbook a blank workbook. I want to enter a job number in cell A1 in the master workbook, for this example we'll use L40009 again. Once I enter that job number in cell A1, I would like excel to search for that job # in each employee's workbook for each month. So, let's say that the first employee that excel will look through is Joe Smith. Excel should start in the January tab and start looking through the job# column (column D). Once it finds L40009 (in this example the first instance would be D79 in the January tab), I want it to copy all the information in A79 to M79 from the January tab in Joe's worksheet. It will then list this information in the master workbook, honestly anywhere, let's say it lists it in cells A3 to M3 in the master workbook. So once again, excel finds job number L40009 in Joe Smith's workbook in January D79, and pulls the information from A79-M79, and copies it to the master sheet in A3-M3. After this it will continue to search through Joe's workbook, the next instance will be in January D80. So it will pull information from A80-M80, and copy it into the master sheet right below the first set of information pulled, so it will copy information from A80-M80, and put it in the master book in A4-M4. This program should continue search through all the months in Joe's sheet, and then move onto the next employee and do the same. After it looks through all the employees' workbooks, the program is done. Let me know if this is clearer or if more information is necessary

  13. #13
    Forum Expert
    Join Date
    10-09-2012
    Location
    Dallas, Texas
    MS-Off Ver
    MO 2010 & 2013
    Posts
    3,049

    Re: Transfer rows of data from multiple workbooks to master workbook based on value in row

    Okay, so that makes more sense, typically people will simplify their model so the forum doesn't have to digest so much text to offer help =)

    Anyway, I'm still unclear on the parameters for this are you saying you will have more than one workbook with 12 worksheets? Or earlier when you first described the problem did you mean you had multiple worksheets?

    In each of the month tabs, what is the maximum number of rows of data? If you k now it won't be very large you can just link the rows then pull everything in to a data tab. Then a vlookup can easily solve your problem.

+ 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. Transferring Data from Multiple Workbooks to a Master Workbook
    By Stopwatch in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 12-28-2013, 08:23 PM
  2. Help on macro to automatic transfer of data from multiple workbooks to master wkbk
    By ryuytsuken in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-10-2013, 06:16 PM
  3. Macro to Transfer data from multiple sheets into rows on a master sheet
    By serrone in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-30-2013, 06:35 AM
  4. [SOLVED] Move data from master workbook to multiple workbooks.
    By visha_1984 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-22-2013, 02:01 PM
  5. Consolidating data from multiple workbooks into Master Workbook
    By zloywolf in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 09-14-2012, 10:26 AM

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