Macro to delete rows before , between , after .

Sunline

Well-known Member
Joined
Oct 6, 2007
Messages
701
Office Version
  1. 2016
Platform
  1. Windows
Hello all , have searched for basic simple macro,s x 3 too to do the following individually but cant find any .
Book999 , sheetA .
Just wanting to get 3 x single macros to delete all rows before row 65001 .
Another for between rows 14,099 and 25,001 .
Another for after rows 65,000 .
Thanks .
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
If I understand your request correctly, try these...

Code:
Sub RemoveBeforeRow65001()
  Rows("1:65000").Delete
End Sub
 
Sub RemoveRowsBetween14099and25001()
  Rows("14100:25000").Delete
End Sub
 
Sub RemoveRowsAfterRow65000()
  Rows("65000:" & Rows.Count).Delete
End Sub
 
Upvote 0
Thanks for those Rick , yes 3 individual macros , will try these out after work tonght .
Thankyou .
 
Upvote 0

Forum statistics

Threads
1,224,599
Messages
6,179,827
Members
452,946
Latest member
JoseDavid

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