Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'm trying to start at B1, then go down until I find a cell containing
"myword" and delete the row with "myword". I'm failing bad and need help. I've looked at many examples like below, but can't get them to run. Sub DeleteRows() Dim theRange As Range, nCells As Integer, I As Integer Set theRange = Selection nCells = theRange.Cells.Count For I = nCells To 1 Step -1 If theRange.Cells(I).Value = "myword" Then theRange.Cells(I).EntireRow.Delete End If Next End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Looping | Excel Discussion (Misc queries) | |||
looping through selected sheet tabs | Excel Programming | |||
looping to End | Excel Programming | |||
Looping | Excel Programming | |||
Need Looping Help | Excel Programming |