Thread: Macro Question
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Mike H. Mike H. is offline
external usenet poster
 
Posts: 471
Default Macro Question

Try this:

Sub doit()

Cells(1, 1).Select
Do While True
If ActiveCell.Value = Empty Then
Exit Do ' I am assuming there is always something in column A so you
use that
'as the basis to do your search...
End If
If Cells(ActiveCell.Row, 1).Value = "Monday" Or Cells(ActiveCell.Row, 1)
= "Tuesday" Or Cells(ActiveCell.Row, 1).Value = "Wednesday" Then
If Cells(ActiveCell.Row, 6).Value < "NOT" Then

Rows(ActiveCell.Row & ":" & ActiveCell.Row).Select
Selection.Delete Shift:=xlUp
Else
Cells(ActiveCell.Row + 1, 1).Select
End If
Else
Cells(ActiveCell.Row + 1, 1).Select
End If
Loop

End Sub