+ Reply to Thread
Results 1 to 21 of 21

Need help pulling data from several identical workbooks and combining into one sheet.

  1. #1
    Forum Contributor
    Join Date
    01-09-2016
    Location
    USA,USA
    MS-Off Ver
    2016
    Posts
    1,192

    Need help pulling data from several identical workbooks and combining into one sheet.

    Can someone help me pull data from several workbooks with this form in it? Each employee will fill out their section, so there isn't any overlap. I can't have a shared workbook. I have that now and it causes issues upon issues and is a CF.

    I have other sheets I need to do like this, but I think I should be able to adjust the macro if I have it. I just don't know where to start with pulling from outside and how to do it efficiently.
    Attached Files Attached Files

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,882

    Re: Need help pulling data from several identical workbooks and combining into one sheet.

    Suggest you re-upload with sample data included. Showing sheets to be consolidated and what the master consolidated looks like. With the current presentation, I have no idea what you have and what you want.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Forum Contributor
    Join Date
    01-09-2016
    Location
    USA,USA
    MS-Off Ver
    2016
    Posts
    1,192

    Re: Need help pulling data from several identical workbooks and combining into one sheet.

    So needy! lol

    Here are two samples. Same thing, but data is in separate fields. It is what I am currently using trying to figure this out. I found a macro online I was trying to make work, but it combines workbooks not worksheets from separate books.
    Attached Files Attached Files

  4. #4
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,882

    Re: Need help pulling data from several identical workbooks and combining into one sheet.

    I'm sorry. I cannot see the correlation between the two files. The data is not the same. How do you know that the information in Book1 goes into column K in Book2. This is not making any sense to me. I am needy. Please describe the business process that you are trying to accomplish in simple English terms. Explain it to me as if we are standing in line at a coffee shop.

    Also, will you combining worksheets from one workbook or one sheet from different workbooks. Very confused

  5. #5
    Forum Contributor
    Join Date
    01-09-2016
    Location
    USA,USA
    MS-Off Ver
    2016
    Posts
    1,192

    Re: Need help pulling data from several identical workbooks and combining into one sheet.

    Each is a log of daily activities on an employee. A:E is Employee 1, while F:J is Employee 2. Everything the employee does during the day is logged for tracking. I want to be able to combine the worksheets together so that all my employees end up on one sheet.

    I am combining workbooks. Right now my team uses a shared workbook and just enters their activity in their columns. since Employee 1 is A:E, they will never overwrite Employee 2. Here is the catch though. I have a few other worksheets that I will be combining, so I can't just mass combine the workbooks all together. I need sheet 1 of each worksheet combined, then i'll need to combined sheet 2 with the other sheet 2s.

    Does that help? The worksheet will always been named Prod Totals. The file name will be employee specific, so either I can alter that to match the name, or if we point to a folder and just combine the contents.

    Perfect world. I run my macro and it goes into my folder. It then combines all sheet 1s together, then combines all sheet 2s together, and all sheet 3s together into one workbook. This is step (sheet) one.

  6. #6
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,428

    Re: Need help pulling data from several identical workbooks and combining into one sheet.

    Can't help thinking you'd make life a lot easier for yourself if you just had one workbook for each employee in a common folder. Then you could collate the data from all the employee workbooks.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  7. #7
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Need help pulling data from several identical workbooks and combining into one sheet.

    I don't know what you tryin' to show with your examples but generally you can use PowerQuery (free add-in for Ex2010 from MS site)

  8. #8
    Registered User
    Join Date
    09-06-2016
    Location
    USA,USA
    MS-Off Ver
    2016
    Posts
    19
    Quote Originally Posted by TMS View Post
    Can't help thinking you'd make life a lot easier for yourself if you just had one workbook for each employee in a common folder. Then you could collate the data from all the employee workbooks.
    That’s what I am trying to do.

  9. #9
    Registered User
    Join Date
    09-06-2016
    Location
    USA,USA
    MS-Off Ver
    2016
    Posts
    19
    Quote Originally Posted by sandy666 View Post
    I don't know what you tryin' to show with your examples but generally you can use PowerQuery (free add-in for Ex2010 from MS site)
    Examples of what each employee would have. It’s two employees. So you have two workbooks. I then need to combine them into one workbook.

  10. #10
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Cool Re: Need help pulling data from several identical workbooks and combining into one sheet.

    So use eg. Main workbook and call from main to every other workbook by PowerQuery. It will make tables on each workbook then on main you can load every table where you want.
    You can load only these columns what you decide to load but if you want to see whole tables from each client your main wokbook will be big.

    After all you need to refresh only your tables on main workbook to see new data from others. (simple version )
    Client's workbooks can be added one-by-one or from folder ie. all-at-once

    I think you will need reorganize your sources a little

    btw. it doesn't work without PQ
    Attached Files Attached Files
    Last edited by sandy666; 11-01-2017 at 09:14 PM. Reason: zip added

  11. #11
    Forum Contributor
    Join Date
    01-09-2016
    Location
    USA,USA
    MS-Off Ver
    2016
    Posts
    1,192

    Re: Need help pulling data from several identical workbooks and combining into one sheet.

    Thanks Sandy, the issue i've discovered with PQ is that it creates a table and creates headings. Like if you look in my sample workbooks. I have headings but they are on row 2 but row 1 has info as well. So creating headings based on row 1 is not correct.

  12. #12
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Need help pulling data from several identical workbooks and combining into one sheet.

    I did it to show example only. This is your job to do it correctly with your own rules

  13. #13
    Forum Contributor
    Join Date
    01-09-2016
    Location
    USA,USA
    MS-Off Ver
    2016
    Posts
    1,192

    Re: Need help pulling data from several identical workbooks and combining into one sheet.

    No. i didn't use your example. I did it on my own. PQ isn't going to work if it is going to add headers.

  14. #14
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Need help pulling data from several identical workbooks and combining into one sheet.

    That is why I said you will need reorganize a little your sources data. PQ works on columns and content. This is easiet way what I know in this case.
    But if it doesn't work for you, sorry.
    Good luck and have a nice day

  15. #15
    Forum Contributor
    Join Date
    01-09-2016
    Location
    USA,USA
    MS-Off Ver
    2016
    Posts
    1,192

    Re: Need help pulling data from several identical workbooks and combining into one sheet.

    Thanks. I have other macros tied to this formatting as well. That's why I was hoping for another macro solution. but thanks for taking a look

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

    Re: Need help pulling data from several identical workbooks and combining into one sheet.

    Quote Originally Posted by taylorsm View Post
    Perfect world. I run my macro and it goes into my folder. It then combines all sheet 1s together, then combines all sheet 2s together, and all sheet 3s together into one workbook. This is step (sheet) one.
    We can do this. One has to assume:

    1) The files are located in a given folder
    2) The sheets(1) in every file are the exact same format
    3) The sheets(2) in every file are the exact same format
    etc...

    I can construct the "merge sheet1" macro, but if we see examples of workbooks with the multiple sheets then the macro could be more diverse from the start.

    Meanwhile, I concur with my colleagues. It would be significantly simpler if each employee simply worked from their own file with all data starting in column A. All files would be the same. The employee's unique name taken from the filename or such. The current layout for entry and the proposed "merged" format both seem cumbersome to maintain and utilize.

    Simply gathering everyone's data together into a single database format is superior in every respect. The data can be easily filtered for any one employee, or more. Pivots, reporting, everything is simple and easy.
    Last edited by JBeaucaire; 11-02-2017 at 11:55 AM.
    _________________
    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!)

  17. #17
    Forum Contributor
    Join Date
    01-09-2016
    Location
    USA,USA
    MS-Off Ver
    2016
    Posts
    1,192

    Re: Need help pulling data from several identical workbooks and combining into one sheet.

    JB Thanks. I think i follow some. This is what I created this morning based on some online samples. Each employee starts in column A. The destination it copies to is the only difference.

    Attached is a workbook that I will use to pull the data to. The employees will have the exact same, except on the "prod totals" sheet, they will only have their five columns. I have a third sheet that I will need to do but haven't even started thinking of that one yet.


    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by taylorsm; 11-02-2017 at 12:07 PM.

  18. #18
    Valued Forum Contributor
    Join Date
    11-02-2016
    Location
    NY
    MS-Off Ver
    2010
    Posts
    459

    Re: Need help pulling data from several identical workbooks and combining into one sheet.

    Another solution is to have each worker have the 'same' worksheet, then combine data via a macro into a consolidated workbook (so for example, if there was 10 Employees, you would have 10 files, one for each employee). The tab name could designate each employee (to differentiate whose did what in Consolidated) OR add another field with their initials/EE number etc. Looks like you are well on your way. Good luck

  19. #19
    Forum Contributor
    Join Date
    01-09-2016
    Location
    USA,USA
    MS-Off Ver
    2016
    Posts
    1,192

    Re: Need help pulling data from several identical workbooks and combining into one sheet.

    queuesef, isn't that what my macro is doing, besides the adding another field?

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

    Re: Need help pulling data from several identical workbooks and combining into one sheet.

    If your macro does what you need, perhaps we should just leave it be.

  21. #21
    Forum Contributor
    Join Date
    01-09-2016
    Location
    USA,USA
    MS-Off Ver
    2016
    Posts
    1,192

    Re: Need help pulling data from several identical workbooks and combining into one sheet.

    No I agree. I'm sure it can function better, but it is functioning... now my other sheets

+ 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. Replies: 8
    Last Post: 03-14-2017, 07:31 PM
  2. Combine data from multiple workbooks into one, while combining sheet data
    By NigelKF in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-08-2016, 09:32 PM
  3. Extracting and combining data from specific sheet from multiple workbooks
    By aggies2010 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-19-2013, 03:39 PM
  4. Replies: 4
    Last Post: 01-25-2012, 05:49 PM
  5. Replies: 1
    Last Post: 01-20-2012, 12:52 AM
  6. Merging the data of two identical Workbooks
    By elastic in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 08-10-2010, 04:18 AM
  7. Replies: 4
    Last Post: 01-27-2005, 12:57 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