Delete Rows of Data After Range Found

cjvenables

Board Regular
Joined
Aug 2, 2011
Messages
65
Hello,

I have a report that runs that returns a different number of rows throughout the month. All columns have the same rows of data, but at the bottom of the report, there is a space in Column A and then there are 4 rows of data after that I want to delete.

I need the VBA code to find the range from A1:The last row of data in Column BN. After, I need it to skip 1 space, and then delete the next 4 rows.

Here is a little example:

Column A

Data
Data
Data
Data
Space
Line 1 Delete
Line 2 Delete
Line 3 Delete
Line 4 Delete

Thanks!
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
Is it the space character, or an empty row?
 
Upvote 0
If column A is filled in for the rows, this could work:

Code:
Range("A" & Rows.Count).End(xlUp).Offset(-4).Resize(5).EntireRow.Delete
 
Upvote 0

Forum statistics

Threads
1,223,498
Messages
6,172,645
Members
452,467
Latest member
colelkay

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