View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
R.Mitchel R.Mitchel is offline
external usenet poster
 
Posts: 1
Default Delete rows with 0


-----Original Message-----
Hi Folks,
Need a way to delete rows if coulmn B D E contain 0.
Any help?
thanks,
DJ
.

I did something similiar, my code was like this.

Sub DeletRows()
Dim myRow As Long
Row = 2
Do
If myRow 2000 Then Exit Do
Select Case Range("N" & myRow).Value

Case "S":
myRow = myRow + 1
Case Else
Rows(myRow & ":" & myRow).Select
Selection.Delete Shift:=xlShiftUp
End Select
Loop
End Sub

I was simply deleting any rows that didn't have a "S" in
column N.