View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
K Dales K Dales is offline
external usenet poster
 
Posts: 131
Default sorting code problems

I think this wil work for you (different approach):

Dim RowNo as Long

RowNo = Range("A1").CurrentRegion.Rows.Count
While RowNo 0
With Range("A" & RowNo)
If LCase(.Value) < "26" Then .EntireRow.Delete
End With
RowNo = RowNo - 1
Wend

-----Original Message-----

Here's what I got, and needless to say attributing to my

extreme lack of
experience its not working. any suggestions?

Dim rng As Range, sStr As String, i As Long
Set rng = Cells(A, 65536).End(xlToLeft)
For i = rng.Row To 1 Step -1
sStr = LCase(Cells(1, i).Value)
If sStr < "26" Then
Cells(A, i).EntireRow.Delete
End If
Next


--
DKY
----------------------------------------------------------

--------------
DKY's Profile: http://www.excelforum.com/member.php?

action=getinfo&userid=14515
View this thread:

http://www.excelforum.com/showthread...hreadid=263154

.