View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Deleting groups of continuous rows where col K = "x"

Jim, thanks for the artillery. I'm pretty sure it's not because of John
Wayne, but I could not get the cannons to fire, despite several tries. My
attempts fizzled out dismally (nothing happened on the sheet). What can I do
to feel the power ?
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Jim Cone" wrote in message
...
Hi Max,

"She Wore a Yellow Ribbon" is on TV now, but I managed to get
this put together...
If it doesn't work blame it on John Wayne.<g
Regards,
Jim Cone
San Francisco, USA
'-------------------------
Sub GetThemXRows()
Dim rngStart As Excel.Range
Dim lngRow As Long
Set rngStart = _
Application.Intersect(ActiveSheet.UsedRange,

ActiveSheet.Columns("K")).Cells
For lngRow = rngStart.Rows.Count To 1 Step -1
If rngStart(lngRow).Value = "X" Then
rngStart(lngRow).Resize(9, 1).EntireRow.Delete
End If
Next ' lngRow
Set rngStart = Nothing
End Sub
'------------------------------