VBA Copy data to another work book based on CONDITIONS

Giggs1991

Board Regular
Joined
Mar 17, 2019
Messages
50
Hi Team,

I would like to copy data from one work book to another. The data has to be copied from BookA to BookB.
However, the issue is that I am not allowed to edit the vba in BookB.
Book A has a list of names and their forecasts.
Book B also has a list of names and forecast but it also has a section for Actuals.
The names in Book B are also in a different order.
The VBA code has to run from Book A since I am not allowed to code on Book B.
The actuals section in Book B should remain unaffected by the macro

BookA

forecasts

Name dec-19 jan-20 feb-20
jack 100 200 300
john 150 250 350
max 175 275 375


Book B location : C:\Users\Giggs\Desktop\2019report
Expected output :

BookB
Actuals
Name dec-19 jan-20 feb-20
jack
john
max

Forecast
Name dec-19 jan-20 feb-20
max 175 275 375
john 150 250 350
jack 100 200 300
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)

Forum statistics

Threads
1,223,703
Messages
6,173,944
Members
452,539
Latest member
delvey

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
Back
Top