VBA Code to copy paste in workbook from another Workbook

Hi There,


I have Workbook “ABC” where i am working on weekly based and this workbook has a ID number of Employees.

I want to use VBA code to get data from any other workbook “CDE” and paste in “ABC” Workbook if “ABC” workbook ID and Other Workbook “CDE” ID match.

How this should work?

1. Manual Open “ABC Workbook.
2. Run Code (Manual Run, I can do it. I will Use button to do it.)
3. Browsing to select the another workbook “CDE” from any folder from where i want.
4. Open Selected Workbook “CDE” and select Sheet.
6. Ask for Index Range and Match Range from “CDE/New Open Workbook” to match “ABC”. (create formula =Index(SheetName!B1:B5,Match(A1,SheetName!A1:A5,0))
7. Ask Paste Formula or Value.

Please note within this process, What if i have opened the two workbook. like “ABC”, “EFG” Another Workbook. As above mention process it will be 3 Workbook. i don’t want close workbook where i am working even 3 or 4 workbook.

Thank you!!

By: Chandra87

Leave a Reply

Your email address will not be published. Required fields are marked *