Copy to Multiple Worksheets With Different Arranged Headers ROW by ROW

foxpro

New Member
Joined
Apr 19, 2024
Messages
1
Office Version
  1. 365
Platform
  1. Windows
  2. Mobile
I have a workbook with 10 worksheets.

The master sheet is called ("DataSource") and the destination worksheets "Dest1", " Dest2", " Dest3", " Dest4", " Dest5", " Dest6", " Dest7", " Dest8", " Dest9", and " Dest10" in the same workbook.
The master sheet ("DataSource") has 20,000 rows.

I want to copy data from a source worksheet ("DataSource") and paste it to all destination worksheets based on a column header in each destination worksheet.
Clear the content of the destination worksheets starting from the second row before pasting new data.
There is a condition for copying a single row each time and saving the result in a new workbook in the same folder.
After finishing the first row and saving the new workbook need to repeat the same process for the second row from the source worksheet until the last row in the source worksheet.
1713567382202.png


1713567467774.png
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
1) How do you determine which row goes to which sheet?
2) Why the strange requirement saving after each row? This will significantly slow down the code
3) Unclear about the last setence about your requirement. What does "saving the new workbook" mean? Where is the new work book coming from?
 
Upvote 0

Forum statistics

Threads
1,215,343
Messages
6,124,404
Members
449,156
Latest member
LSchleppi

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