Macro to delete specific rows above selected cell
one way if a10 is selected
ActiveCell.Offset(-3, 0).Resize(2, 1).EntireRow.Delete
--
Gary
wrote in message
oups.com...
Hello,
I am trying to write the following macro, but I can't seem to get it
right.
I've had a look around on the other posts but I cant find anything to
suit.
I am using Excel 2002.
The macro contains other elements which I have sucessfully programmed.
At this point in the macro, a specific cell has been selected, and I
need to delete two specific rows which are above this cell.
A practical example would be, supposing Cell A10 has been selected as
the selected cell, the macro must now delete Rows 7 and 8 only, leaving
Rows 1-6 and 9-10 as they are.
If anybody can assist with this it would be much appreciated.
Many thanks.
Richard.
|