View Full Version : delete rows between 2 named ranges in excel 2003

02-08-2012, 01:01 PM
I have two named ranges on a work sheet (NewYear) and (ActName). I'm having problems editing the following code to only delete the blank rows inbetween the named ranges without deleting the named ranges.

Rows("1:" & Range("NewYear").Row - 1).Delete

the above code deletes all the rows above the New Year named range.

Bob Phillips
02-08-2012, 04:26 PM

Range(Cells(1, Range("NewYear").Column), Range("NewYear").Cells(1, 1).Offset(-1, 0)).SpecialCells(xlCellTypeBlanks).EntireRow.Delete