View Single Post
  #11   Report Post  
Posted to microsoft.public.excel.programming
[email protected][_2_] rumkus@hotmail.com[_2_] is offline
external usenet poster
 
Posts: 60
Default Delete Rows as per Text, Font Color, Font Type, Time Format

Let's try this then - with James' permission.

Sub RowKiller()
Dim boo As Boolean, EndOfB As Long, rKill As Range
Dim i As Long
Set rKill = Nothing
EndOfB = Cells(Rows.Count, "B").End(xlUp).Row
For i = 1 To EndOfB
With Cells(i, "B")
boo = (InStr(1, .Text, ":")) Or (.Value = "ABCD") Or (.Font.Name =
"Arial" And .Font.ColorIndex = 1)
If boo Then
If rKill Is Nothing Then
Set rKill = Cells(i, "B")
Else
Set rKill = Union(rKill, Cells(i, "B"))
End If
End If
End With
Next
If rKill Is Nothing Then
Else
rKill.EntireRow.Delete
End If
End Sub

Also please visit http://www.j-walk.com/ss/excel/tips/tip62.htm for
checking data types.
Rgds