Hi everyone!
I'm looking to compare two columns on 2 different files. Let's call them Column 1A (File 1, always has the same file name and directory) and Column 2A (File 2, shares directory with File 1).
I want to extract the unique values from Column 1A that are not present in Column 2A and paste them at the very end of Column 2A. I also want to copy columns 1B, 1C and 1D for the values that were copied from Column 1A.
1A 1B 1C 1D
XXA XXB XXC XXD
YYA YYB YYC YYD
WWA WWB WWC WWD
ZZA ZZB ZZC ZZD
2A 2B 2C 2D
XXA XXB XXC XXD
YYA YYB YYC YYD
In this case, the macro would compare columns 1A and 2A. It would then find "WWA" and "ZZA" as a unique values on column 1A that are not present in column 2A. Then it would copy WWA, ZZA and their respective values on columns 1B, 1C and 1D and paste those 4 columns at the end of my used range on file 2 (in this case, file 2's table would now look like file 1's table). If this is a difficult / impossible step, then I can just use a vlookup between both files to bring in the data from columns 1B, 1C and 1D.
I hope this makes sense, my capabilities on VBA are quite limited and I'm struggling with this one. Please let me know if I can provide further info, any help would be really appreciated
Many thanks!!
Tiago
I'm looking to compare two columns on 2 different files. Let's call them Column 1A (File 1, always has the same file name and directory) and Column 2A (File 2, shares directory with File 1).
I want to extract the unique values from Column 1A that are not present in Column 2A and paste them at the very end of Column 2A. I also want to copy columns 1B, 1C and 1D for the values that were copied from Column 1A.
1A 1B 1C 1D
XXA XXB XXC XXD
YYA YYB YYC YYD
WWA WWB WWC WWD
ZZA ZZB ZZC ZZD
2A 2B 2C 2D
XXA XXB XXC XXD
YYA YYB YYC YYD
In this case, the macro would compare columns 1A and 2A. It would then find "WWA" and "ZZA" as a unique values on column 1A that are not present in column 2A. Then it would copy WWA, ZZA and their respective values on columns 1B, 1C and 1D and paste those 4 columns at the end of my used range on file 2 (in this case, file 2's table would now look like file 1's table). If this is a difficult / impossible step, then I can just use a vlookup between both files to bring in the data from columns 1B, 1C and 1D.
I hope this makes sense, my capabilities on VBA are quite limited and I'm struggling with this one. Please let me know if I can provide further info, any help would be really appreciated
Many thanks!!
Tiago