Copy data from one Excel file into another using a macro
Posted on 2014-01-25
Let's say I am in Sheet1 of the target Excel file named File1. I need a macro that will open File2, copy the contents of cell H4 in Sheet3 of File2 to cell B2 in Sheet1 of File1 and copy the contents of cell J10 in Sheet3 of File2 to cell B3 in Sheet1 of File1 and then close File2 and Save the changes made to File1. Ideally, I'd like to be able to press a command button or some other control to run the macro.
By the way, I'm presuming File2 has to be opened first in order to copy from it. That's why I indicated the open and close steps above. If those steps are not necessary, then skip. I'm just trying to copy data from and to specific locations (cell addresses) between two Excel files.