Frustrated VB newbie here.

ultratch47

Board Regular
Joined
Aug 6, 2002
Messages
126
i have a report (4000 rows) the top half (~2000) rows is designated as one report and the bottom, is another. They are seperate by a blank row. I have a code that will delete the bottom half and keep the top on the existing sheet.
my current code is this:
"keep top of report
Range(Range("E2").End(xlDown).Offset(1, 0), Range("E65536").End(xlUp)).EntireRow.Delete

however, i want it to seperate the two reports (neither is static) using that blank line.
keep the top report on the current page and cut/paste the bottom to a new sheet.

thanks for any help.
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
Instead of using Delete use Cut with a Destination argument, eg:

Code:
Range(Range("E2").End(xlDown).Offset(1, 0), Range("E65536").End(xlUp)).EntireRow.Cut Worksheets("Sheet2").Range("A1")
 
Upvote 0

Forum statistics

Threads
1,214,585
Messages
6,120,391
Members
448,957
Latest member
Hat4Life

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