View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson
 
Posts: n/a
Default Resize selection made by "name" VBA

Without knowing too much...

Dim myRng As Range
Dim iRow As Long

Set myRng = Worksheets("sheet1").Range("testrng")

'keep first and last
For iRow = myRng.Rows.Count - 1 To 2 Step -1
myRng.Rows(iRow).EntireRow.Delete
Next iRow




spydor wrote:

Hi...Thanks for your help!!!

The problem is thussly.....

I have selected a range by "name" and I need to delete some of it's
contents without losing the top and bottom lines which are the location
lines for finding the "name" range. Got any clean, simple ways to do
this????
Thanks....
Spydor

--
spydor
------------------------------------------------------------------------
spydor's Profile: http://www.excelforum.com/member.php...o&userid=28438
View this thread: http://www.excelforum.com/showthread...hreadid=505183


--

Dave Peterson