LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 93
Default Specific Range Deletion

What is a good formula for Deleting a specific range of rows? I am trying to
figure out a way to delete all but the last 10 rows from a large set. I'm
implementing it into a macro, and am struggling with how to get it done. I
currently am experimenting with this:

Dim r As Range
Dim lastrow As Long
lastrow = Cells(Rows.Count, "V").End(xlUp).Row
Set r = Range(Cells(1, "V"), Cells(lastrow - 10, "V"))
r.EntireRow.Delete

Though it's not working. Any better ideas? THANKS !!!!
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Automatic deletion of specific cells from multiple sheets Jman Excel Worksheet Functions 4 June 12th 07 03:44 PM
Selecting a Range from an Offset for deletion - Help please MichaelC Excel Programming 5 June 13th 05 11:31 PM
Control Deletion of Range Names Alex Hatzisavas[_5_] Excel Programming 0 September 22nd 04 08:55 PM
Control Deletion of Range Names Alex Hatzisavas[_4_] Excel Programming 1 September 22nd 04 09:36 AM
Range deletion gavmer[_46_] Excel Programming 1 July 2nd 04 01:09 AM


All times are GMT +1. The time now is 05:22 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"