View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Ed Ed is offline
external usenet poster
 
Posts: 399
Default Not IsNumeric not working - or is it me?

I'm trying to evaluate all cells down a column and delete all rows with a
non-number in the cell. It was working fine - until I hit "*85"!! The *
threw everthing off. So I was trying to use Not IsNumeric to evaluate the
second character of the cell value. But my code is not working. Apparently
I'm using it wrong. If anyone can help. I'd appreciate it.

Ed

Do
If .Cells(i, 1).Value = "" Or _
.Cells(i, 1).Value = " " Then
.Cells(i, 1).EntireRow.Delete
j = .Rows.Count
****** Problem area ******
ElseIf Len(.Cells(i, 1).Value) 1 And _
Not IsNumeric(Left(.Cells(i, 1).Value, 2)) Then
****** Problem area ******
.Cells(i, 1).EntireRow.Delete
j = .Rows.Count
Else
i = i + 1
End If
Loop Until i j