Originally Posted by
Yulichka
I have 2 files with identical column headings and different number of rows. Is there a way to merge these files automatically in a third file when you open it? Basically, every time a 3rd file is opened, the code deletes the information that was previously there and then populates it with the information from the original 2 files. The 2 original files are constantly updated; therefore the number of rows in each file is not consistent. However, the headers are always the same. And the files are matched by a header.
I hope this is somewhat clear.
My extent of dealing with macro is recording my steps when I am working through interface and then running it when necessary.
Please let me know if what I am requesting is possible and how it can be done. I appreciate all/any help.
Julia
Hi
Use the following code. You'll need to change the names of "Workbook1" & "Workbook2" to your names.
If there are either
1. More than one sheet in either of the two workbooks or
2. Blank rows in either of the sheets in the two workbooks,
then the macro above will need modifying.
HTH
2
Bookmarks