View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
orquidea orquidea is offline
external usenet poster
 
Posts: 132
Default Error in a Macro

Hi:

The below macro is supposed to delete the complete rows when the cells in
columm E are not equal to "CNR001". I am getting an error in rows.Delete

Could anyone help me checking out this macro for me.

Thanks.

Sub NoProReport()

Range("E1").Select

For Carrier = 1 To 1000

If Carrier = "CNR001" Then
ActiveCell(1, 0).Select

Else
rows.Delete

End If
Next Carrier

End Sub