muppet77 said:i want to rank the words on the second letter of the word (after the first), then third etc
ie alphabetical order - the title of the thread
is this poss do you think?
Public Function ParseRange()
Dim C As Variant
For Each C In Worksheets("A_Sheet_Name").Range("a_range")
If Len(C.Value) = 0 Then
' Found the end.
Exit For
Else
' Do something with it
End If
Next C
End Function
muppet77 said:sorry!
all values are different.
no two apples
just one
Option Explicit
Sub RankIt()
Dim x As Long
Dim LastRow As Long
LastRow = Range("A65536").End(xlUp).Row
For x = 1 To LastRow
Range("B" & x).Value = Mid(Range("A" & x).Value, 2, Len(Range("A" & x).Value))
Range("C" & x).Value = x
Next x
Range("B1:C" & LastRow).Sort Key1:=Range("B1"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
For x = 1 To LastRow
Range("D" & x).Value = Application.WorksheetFunction.Match(x, Range("C1:C" & LastRow), 0)
Next x
End Sub