I have 15-20 workbooks which I have run macros to make them all consistent, where lastname, first name is in Col A, Age is in Col B, Gender in Col C, and a different Code is in Col D. All of the workbooks contain other columns, but I only need to merge Col A-D in each open workbook into the first one, where the results have Col D E F G H, etc. all contain the codes in the other workbooks.
So it would probably first need to match up and merge the second open workbook to the first one, then the third one to the results of the merge, then the fourth to those results, etc. because the codes all need to "line up" in the same columns. If it doesn't find a matching code in the previous merge, it would need to add a new column.
For example, let's say workbook AA.xls has
Name Age Gender AA
Aguilar, Christine 30 F AA
Aguilera, Erica 20 F AA
Aguilera, Lynn Sue 43 F AA
Workbook COPD.xls has
Name Age Gender COPD
Aguilar, Christine 30 F COPD
Aguilera, Erica 20 F COPD
Alcarez Jr., Arnold 29 M COPD
Alfaro, Claudia 32 F COPD
Workbook DEP.xls has
Name Age Gender DEP
Aguilera, Erica 20 F DEP
Alcarez Jr., Arnold 29 M DEP
Alpert, Sara 28 F DEP
The ending result I need would be:
Name Age Gender AA COPD DEP
Aguilar, Christine 30 F AA COPD
Aguilera, Erica 20 F AA COPD DEP
Aguilera, Lynn Sue 43 F AA
Alcarez Jr., Arnold 29 M COPD
Alfaro, Claudia 32 F COPD
Alpert, Sara 28 F DEP
Can this be done?
Bookmarks