Macro help to copy data from one workseet to another

AdRock

Board Regular
Joined
Apr 1, 2011
Messages
128
I am trying to create a macro which will help eliminate a laborious task of copy data from one sheet to another.

Here is an example of some data I need to copy
Class 1

Id Name Grade
1 Tom C
2 Sally D
3 John B
4 Alan C
5 Lee A

Class 2

Id Name Grade
1 Nick C
2 Lauren A
3 Dave A
4 Sam A
5 Daniel A
6 Jo B
7 Lisa E

Class 3

Id Name Grade
1 Jack A
2 Jacob A
3 Milly A

What I want to copy is the everything from the row with the headers (Id, name and Grade) in worksheet 1, down until it finds a empty row. When it finds an empty row, i want to copy that data into worksheet 2, insert a page break after the copied data and then copy the next section of data and so on until there is no more data to copy.

I think I can insert the page breaks easily enough and the formatting of the new sheet is already done.

It is just basically a copy and paste but only the data that i need.
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.

Forum statistics

Threads
1,224,545
Messages
6,179,432
Members
452,915
Latest member
hannnahheileen

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