![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Mar 2002
Posts: 20
|
I am having difficulty remembering the code to delete rows I do not require in a large spreadsheet. If the cell to the left of the active cell contains a certain word (say "NONE") I want to delete the entire row plus the three rows beneath.
Can anyone help Thanks |
|
|
|
|
|
#2 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Monterrey, Mexico
Posts: 1,433
|
Try the following code:
If ActiveCell.Offset(0, -1).Value = "NONE" Then Range(ActiveCell, ActiveCell.Offset(3, 0)).Select Selection.EntireRow.Delete End If Hope this helps. Kind regards, Al. |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|