VBA Code to copy paste in workbook from another Workbook

Chandra87

New Member
Joined
Apr 30, 2018
Messages
2
Hi There,
I am a new member!!

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!!
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney

Forum statistics

Threads
1,171,655
Messages
5,876,721
Members
433,207
Latest member
Bitt0101

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top