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.
 

Some videos you may like

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"

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")
 

Watch MrExcel Video

Forum statistics

Threads
1,122,556
Messages
5,596,820
Members
414,104
Latest member
imamalidadashzada

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