Thread
:
Macro to delete specific rows above selected cell
View Single Post
#
2
Posted to microsoft.public.excel.programming
Die_Another_Day
external usenet poster
Posts: 644
Macro to delete specific rows above selected cell
Rows(ActiveCell.Row - 3 & ":" & ActiveCell.Row - 2).Delete
HTH
Charles
wrote:
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.
Reply With Quote
Die_Another_Day
View Public Profile
Find all posts by Die_Another_Day