View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
tahrah tahrah is offline
external usenet poster
 
Posts: 30
Default Trying to delete rows and it's not working

Here's the code again without the <<<<<<<<<:

lngRow = Range("A2001").End(xlUp).Row + 1
Rows(lngRow & ":2001").Select
Selection.Delete Shift:=xlUp = True
lngRow = Range("C2001").End(xlUp).Row + 1
Rows(lngRow & ":2001").Select
Selection.Delete Shift:=xlUp = True
For Each rngCell In Range("A1", Cells(lngRow - 1, "A"))
If rngCell.Value = "SO NUMBER" Then
rngCell.EntireRow.Select
Selection.Delete Shift:=xlUp = True
End If
Next 'rngCell
For Each rngCell In Range("C1", Cells(lngRow - 1, "C"))
If rngCell.Value = "LOG DETAIL" Then
rngCell.EntireRow.Select
Selection.Delete Shift:=xlUp = True
End If
Next 'rngCell
For Each rngCell In Range("B1", Cells(lngRow - 1, "B"))
If rngCell.Value = "'---" Then
rngCell.EntireRow.Select
Selection.Delete Shift:=xlUp = True
End If
Next 'rngCell