So I'm finishing up a study right now and am hoping to get some help with a macro which will help to reorganize all the data.
So the software we're using will automatically generate data files based off of each participants data. Theres 4 different conditions in the study and the program will organize each persons data based on the particular condition they were in. So I'll have say a "Full-Auto Progress Data" file which will have each participants number in column A and then the related data in each additional column for every participants run through the full-auto condition. Columns C-L have all the data I need.
Now in the master data file we're creating column A represents the participant, and column B the specific condition they were in (Full auto, semi, manual, semi-vis). After that columns D-M contain all the data being pulled from the individual conditions files.
The master data file looks like this for an example
1020 semi
1020 semi-vis
1020 auto
1020 manual
1021 manual
etc....
Is there some type of VB module I could use to open up one of the condition files, like the "Full-Auto Progress Data" and then copy the data for each participant over into the master file by matching the participants number and using the condition in column B "Full-Auto" in this case as a qualifier for the copy?
For each of the 4 condition files it would need to match up the participant number, and then insert the data only if next to the participant number it has the correct condition. I have attached the files for reference, but the encap master attachment is just the one sheet from the master document. If it makes things trickery to insert it into a specific sheet of a file I can always have a file just for the encapsulation and copy that whole sheet over at the end. Right now I've been manually going through and copying a rows from each file over into the master, and it's quite time consuming with as much data as we're beginning to generate. If anyone can help it'd be appreciated.
Note* The generated files for each condition are in an .csv format but I do have a converter if they need to all be in .xls or .xlsx
Bookmarks