Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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. |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thank you both for your help on this, much appreciated.
|
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
In VBA, How to Refer to Cell In Specific Column But Selected Rows? | Excel Discussion (Misc queries) | |||
Macro to delete rows containing specific data | New Users to Excel | |||
delete all rows above a selected cell | Excel Programming | |||
Macro to delete specific rows | Excel Programming | |||
Need a macro to delete selected rows | Excel Programming |