Hello,
Let me start of by saying that I know nothing about VBA. I have some Java experience, but VBA looks crazy to me. I have tried to modify others code, but I obviously don't understand VBA syntax well enough (which means not at all
). Here is what I need to do:
Basically I want a macro(in Excel 2010) that will loop through each ID in workbook2, and find it in workbook1, and copy all the data (only columns B-E) from workbook 1 to workbook 2, and repeat, until there are no more id's in workbook2. If the id can't be found in workbook1, then leave the row blank in workbook2 and move on. I was thinking something like this:
A |
B |
C |
D |
E |
F |
ID |
data1 |
data2 |
data3 |
data4 |
data5 |
1 |
58 |
27 |
48 |
10 |
38 |
2 |
78 |
809 |
34 |
34 |
433 |
3 |
78 |
980 |
123 |
3421 |
12 |
4 |
345 |
432 |
23 |
54 |
1 |
Workbook2>Sheet2
A |
B |
C |
D |
E |
F |
ID |
data1 |
data2 |
data3 |
data4 |
data5 |
1 |
|
|
|
|
|
3 |
|
|
|
|
|
6 |
|
|
|
|
|
Desired Result
Workbook2>Sheet2 (after macro has run)
A |
B |
C |
D |
E |
F |
ID |
data1 |
data2 |
data3 |
data4 |
data5 |
1 |
58 |
27 |
48 |
10 |
|
3 |
78 |
809 |
34 |
34 |
|
6 |
|
|
|
|
|
What do you guys think?
Thanks!!
Bookmarks