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

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)

Andrew Poulsom

MrExcel MVP
Joined
Jul 21, 2002
Messages
73,092
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")
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,167,961
Messages
5,856,531
Members
431,819
Latest member
Tori Murphy

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
Top