[font=Verdana][color=darkblue]Option[/color] [color=darkblue]Explicit[/color]
[color=darkblue]Private[/color] [color=darkblue]Sub[/color] UserForm_Initialize()
[color=darkblue]Dim[/color] vInput() [color=darkblue]As[/color] [color=darkblue]Variant[/color]
[color=darkblue]Dim[/color] vData() [color=darkblue]As[/color] [color=darkblue]Variant[/color]
[color=darkblue]Dim[/color] LastRow [color=darkblue]As[/color] [color=darkblue]Long[/color]
[color=darkblue]Dim[/color] i [color=darkblue]As[/color] [color=darkblue]Long[/color]
[color=darkblue]Dim[/color] j [color=darkblue]As[/color] [color=darkblue]Long[/color]
[color=darkblue]Dim[/color] temp1 [color=darkblue]As[/color] [color=darkblue]Variant[/color]
[color=darkblue]Dim[/color] temp2 [color=darkblue]As[/color] [color=darkblue]Variant[/color]
[color=darkblue]Dim[/color] temp3 [color=darkblue]As[/color] [color=darkblue]Variant[/color]
[color=darkblue]Dim[/color] Nme [color=darkblue]As[/color] [color=darkblue]String[/color]
[color=darkblue]Dim[/color] Txt [color=darkblue]As[/color] [color=darkblue]String[/color]
LastRow = Cells(Rows.Count, "D").End(xlUp).Row
vInput = Range(Cells(2, 2), Cells(LastRow, 4))
[color=darkblue]ReDim[/color] vData(1 [color=darkblue]To[/color] [color=darkblue]UBound[/color](vInput), 1 [color=darkblue]To[/color] 3)
[color=darkblue]For[/color] i = 1 [color=darkblue]To[/color] [color=darkblue]UBound[/color](vInput)
Nme = vInput(i, 3)
Txt = Mid(Nme, InStrRev(Nme, " ") + 1) & ", " & Left(Nme, InStrRev(Nme, " ") - 1)
vData(i, 1) = vInput(i, 2)
vData(i, 2) = Txt
vData(i, 3) = vInput(i, 1)
[color=darkblue]Next[/color] i
[color=darkblue]For[/color] i = 1 [color=darkblue]To[/color] [color=darkblue]UBound[/color](vData) - 1
[color=darkblue]For[/color] j = i + 1 [color=darkblue]To[/color] [color=darkblue]UBound[/color](vData)
[color=darkblue]If[/color] vData(i, 2) > vData(j, 2) [color=darkblue]Then[/color]
temp1 = vData(j, 1)
temp2 = vData(j, 2)
temp3 = vData(j, 3)
vData(j, 1) = vData(i, 1)
vData(j, 2) = vData(i, 2)
vData(j, 3) = vData(i, 3)
vData(i, 1) = temp1
vData(i, 2) = temp2
vData(i, 3) = temp3
[color=darkblue]End[/color] [color=darkblue]If[/color]
[color=darkblue]Next[/color] j
[color=darkblue]Next[/color] i
Me.ListBox1.List = vData
[color=darkblue]End[/color] [color=darkblue]Sub[/color]
[/font]