View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
pikus pikus is offline
external usenet poster
 
Posts: 1
Default Excel 2000 VBA Sort without Select

Dim ws As Worksheet
See if this helps. I'll be glad to explain how it works if you need m
to. - Pikus

Set ws = Worksheets(1)

For x = 2 To 50
alph = ws.Cells(x, 1).Value
a = x + 1
z = x
For y = a To 600
If ws.Cells(y, 1).Value < alph And ws.Cells(y, 1).Value < "
Then
alph = ws.Cells(y, 1).Value
z = y
End If
Next y

If z < x Then
ws.Rows(z).Cut
ws.Rows(x).Insert
End If

Next

--
Message posted from http://www.ExcelForum.com