View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
John Keith John Keith is offline
external usenet poster
 
Posts: 172
Default Delete row if column A cell text length is not 11

On Tue, 30 Sep 2008 07:53:26 -0500, Dave Peterson
wrote:


Dim LastRow as long
dim i As long
With activesheet
'just look at the rows that are used
lastrow = .cells(.rows.count,"A").end(xlup).row

For i = lastrow to 1 Step -1
If len(.cells(i,"A").value) < 11 then
.Rows(i).Delete
End If
Next i
End with



Dave,

Thank you for your solution. It has given me a key for another problem
I need to solve.


John Keith