View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Gord Dibben Gord Dibben is offline
external usenet poster
 
Posts: 22,906
Default delete all rows above a selected cell

If no blank cells above the active cell........

Sub SelectUp()
Range(ActiveCell, ActiveCell.End(xlUp)).EntireRow.Delete
End Sub

Otherwise.....

Sub SelectUp()
Range(ActiveCell, Range("A1")).EntireRow.Delete
End Sub


Gord Dibben Excel MVP


On Mon, 13 Jun 2005 16:11:27 -0500, rroach
wrote:


I have a macro that selects a specific (and different in each worksheet)
cell based on cell contents. From that cell location (it is the
activated cell at current step of macro) I want to highlight and delete
all rows in the worksheet above to the top of the worksheet. I'm stuck.
Any ideas?