+ Reply to Thread
Results 1 to 6 of 6

Extracting data from multiple workbooks into one

  1. #1
    Registered User
    Join Date
    12-20-2018
    Location
    Sweden
    MS-Off Ver
    Office365
    Posts
    3

    Extracting data from multiple workbooks into one

    Hi,
    First off, I am a complete newbie at macros. I have found several threads on this topic but can't seem to get it right still...

    Background: A survey with 40ish groups (each containing 5 or so persons) have been performed. I want to gather the answers and respondants to all the questions in 1 excel-file.

    Problem: I have one folder for each team (named after the team). In each team folder, the structure is the exact same (same amount of folders and filenames). There are several subfolders (8 of which are relevant). Each of these subfolders contains several different folders (one for each question). In each of these folders, there are 2 excel-files that are of interest. One named "meta" and one named "data". "Meta" contains the question, and "data" the answers. The name of the question in "meta" is located in B2. The responses in "data" is located in D2-X (X depending on the number of responses). The respondants are located in "data" H2-X (X depending on the number of responses).

    I would like to do the following:
    1. Extract the questions from each "meta" file and put them each in row 1, starting from B1.
    2. Extract the respondants from each "data" file and put them in column 1, starting from A2.
    3. Extract the answers from each "data" file and put them in rows, starting from B2 (the answers need to correspond to the correct respondant and question)

    I appreciate all the help I can get. All the best!
    Attached Files Attached Files
    Last edited by henke_a_; 12-21-2018 at 06:41 AM.

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,482

    Re: Extracting data from multiple workbooks into one

    Attaching a sample workbook enables others to work on your problem:

    To attach a sample workbook. Make sure there is just enough data to make it clear what is needed. Include BEFORE/AFTER sheets if needed to show the process you're trying to complete or automate. Remember to desensitize the data.

    Click on GO ADVANCED and click "manage attachments" to open the upload window.


    To add a file to a post

  3. #3
    Registered User
    Join Date
    12-20-2018
    Location
    Sweden
    MS-Off Ver
    Office365
    Posts
    3

    Re: Extracting data from multiple workbooks into one

    I just uploaded an example.

  4. #4
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,064

    Re: Extracting data from multiple workbooks into one

    Your sample doesn't make much sense.

    You show answer 1 for respondent 1 then answer 2 for respondant 2. Where as answer 1 for respondant 2, answer 2 for repondant 1 etc, etc

    Is Q2 on the ext row after Q1.

    Please amend to make it UNAMBIGUOUS.
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  5. #5
    Registered User
    Join Date
    12-20-2018
    Location
    Sweden
    MS-Off Ver
    Office365
    Posts
    3

    Re: Extracting data from multiple workbooks into one

    Sorry about that! I have made updates to make it more clear.

    There are several "Meta" and "Data" files. Each question comes from an individual "Meta" file, and the answers to each question comes in an individual "Data" file.

  6. #6
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,064

    Re: Extracting data from multiple workbooks into one

    I have just noticed that this is in the VBA section. So... this will probably be of limited interest to you. However, since I did it, here it is. Formula based.
    Attached Files Attached Files

+ 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. Macro for extracting data from multiple worksheets from multiple workbooks
    By Piulitsa in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 09-09-2018, 02:50 PM
  2. Extracting data from multiple workbooks in to one book
    By knutsocw in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-15-2016, 04:25 PM
  3. [SOLVED] Extracting Data from specified Cols in Multiple Workbooks
    By hammer2 in forum Excel Programming / VBA / Macros
    Replies: 36
    Last Post: 09-29-2015, 10:57 PM
  4. Extracting Data from multiple workbooks using ID number
    By sheexin in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-16-2015, 11:59 PM
  5. How can I create a macro for extracting data from multiple workbooks within a folder
    By surfing69 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-06-2013, 11:36 AM
  6. Replies: 0
    Last Post: 07-29-2013, 03:00 AM
  7. 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

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