View Single Post
  #17   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Gord Dibben Gord Dibben is offline
external usenet poster
 
Posts: 22,906
Default What is wrong with this Macro?

Thanks.

I have been following your other "missing a command" thread and note the
progression to a solution.


Gord

On Sat, 23 Feb 2008 20:40:02 -0800, jeannie v
wrote:

Good Evening, Gord:

You are correct and I trust your expertise...Thank you for all your help...I
had so many replies that I became confused: I did finally come up with the
following that seems to work just fine:

Sub DeleteLOATermedDupRecords()
'
mc = "J"
For i = Cells(Rows.Count, mc).End(xlUp).Row To 1 Step -1
If Cells(i, "I") = "0" Then
If Cells(i, mc) = "LOA" _
Or Cells(i, mc) = "Termed" _
Or Cells(i, mc) = "Duplicate" Then
Rows(i).Delete
End If
End If
Next i
'
End Sub