Macro to copy rows with data from one sheet to another...

LittleAngel

New Member
Joined
Jul 30, 2002
Messages
12
I have 2 worksheets. I'd like to have a macro (I am new to macros) that does the following:

- Starts in Sheet 1 in a cell that you pick (usually row 7 column A)
- Checks that row if it's blank
- If it's not blank, copy the row to sheet 2 (row 1)
- if it is blank, check the next row for data.
- If the next row has data, copy that data after the last copied data in sheet 2 (row 2)
- if it's blank, quit.
- Keep checking for blank rows and copying into sheet two until it comes to two consecutive rows that are blank.

Thank you!
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.

Forum statistics

Threads
1,216,036
Messages
6,128,432
Members
449,452
Latest member
Chris87

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