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: 20

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.

Forum statistics

Threads
1,215,032
Messages
6,122,772
Members
449,095
Latest member
m_smith_solihull

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