View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Andrei Andrei is offline
external usenet poster
 
Posts: 53
Default Macro analyses Cell . If text found , delets entire row

Yep , i meant any text not including numeric entry

The macro gives a type mismatch for :
For c = rColC(rColC.Count) To 1 Step -1


@Gary''s Student

I tried your macro , also . But it nothing happens


"Otto Moehrbach" wrote:

I didn't take your "text" to mean the word "text". I think you meant any
text not including a numeric entry. The following macro will do what you
want. HTH Otto
Sub DelCText()
Dim rColC As Range
Dim c As Long
Set rColC = Range("C2", Range("C" & Rows.Count).End(xlUp))
For c = rColC(rColC.Count) To 1 Step -1
If rColC(c) < "" And _
Not IsNumeric(rColC(c)) Then _
rColC(c).EntireRow.Delete
Next c
End Sub