Delete a large number of rows and columns

abktw2

New Member
Joined
Jul 17, 2008
Messages
15
I recently joined a new team at work who uses a spreadsheet to track savings. It is shared between multiple users. The problem is that for some reason, at some point, someone decided to copy the formatting all the way down to row 65536 and row IV. If you try to manually delete say 1000 blank rows it will run and result in the same situation. The SS is not currently locked as well. Since it is shared I cannot make a macro directly in it. I thought to get around this I would create one in another open workbook. I need it to delete all rows below 1313 and all columns right of BJ. Any help would be appreciated as I am currently trying to teach myself VBA from a book but it is a slow process for sure.

Adam
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
Range("A1314:A65536").EntireRow.Delete

Range("BK:IV").EntireColumn.Delete

You do not have to make a macro to do this, just type these codes in the Immediate window of the VBA editor.
 
Upvote 0
Thanks for the help. The only problem with this is that the whole ss locks (task manager says its running) so I am assuming its stuck in a loop of trying to replace the deleted rows.
 
Upvote 0
Ok... try this one.

Range("A1314:IV65536").Delete

Then

Range("BK1:IV1314").Delete
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,337
Members
452,637
Latest member
Ezio2866

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