Copy rows to multiple workbooks in folder without opening based on value in column A of master workbook.

Loharris321

New Member
Joined
Jun 2, 2021
Messages
1
Office Version
  1. 365
Platform
  1. Windows
I don't know much about VBA, but I have multiple workbooks that are saved in folder on my desktop (about 40 workbooks) that I must update each month and if I can use VBA to do the update it will save me a considerable amount of time. The forty workbooks are 40 different LAC business Units, i.e., BU 20111, BU 20115, BU 20110 etc. Each of the 40 workbooks have a number of different tabs, but they all have a Net Book Value tab and General Ledger Tab. These are the two tabs that must get updated each month with new data. The tabs have the BU number as part of the name, i.e., 20111 NBV and 20111 GL. 20115 NBV and 20115 GL. 20110 NBV and 20115 GL.

I have a master data workbook that has a General Ledger (GL) and a Net Book Value (NBV) tab. These two tabs in the master workbook has all the data that needs to be placed into the GL and NBV tabs of the different workbooks that are in the folder saved to my desktop. The master workbook has the different business unit numbers starting in column A2 under the column heading Business Unit. A particular business unit can contain anywhere from 1 row of data to as many as 2000 rows of data in the master workbook. What I need is a VBA code that will search column A of the GL tab in the master workbook and if it finds 20111, it copies that row from column A to Column I and paste it into the GL tab of the BU 20111 workbook starting at row A2. The VBA code would do the same for the NBV tab. The column headings from column A to I are same in the master workbook and destination workbook. The data changes each month, therefore, I would like the old data to be replaced with the new data each month. There might be 100 rows of data for BU 20111 in column A of the master workbook and only 3 rows of data for BU 20115. Next month it might be the complete opposite.

There are at least 40 different business units (workbooks) saved in the folder on my desktop, therefore, if the data from the master workbook can be copied and placed into the NBV and GL tabs of those 40 workbooks with having to open each one it would be great. Any help with creating such VBA code will be greatly appreciated and save me tons of time.
 

Attachments

  • BU 20115.JPG
    BU 20115.JPG
    175.2 KB · Views: 6

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple

Forum statistics

Threads
1,136,288
Messages
5,674,867
Members
419,530
Latest member
undisclosed

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