Hi Adrian,
I was unable to open the .xls file you had posted since I'm running Excel 2003 and that file must be for a later version. Attached below is code for populating cells with scores and sorting them by value then by name.
I attached the .xls file to this post so you can see it run if that helps.
If this doesn't help you, you can save down the .xls file you posted as an Excel 2003 file and I will take a look at it to see exactly what you are trying to do
Thanks,
Daniel
Option Explicit
Public i As Long
Public uName As String
Public uScore As Single
Sub AddScore()
Dim LastRow As Long
Sheets("Master Score").Select
frmScore.Show
' Find LastRow
LastRow = Cells(Rows.Count, "A").End(xlUp).Row
LastRow = LastRow + 1
' Add new values
Cells(LastRow, 1) = uName
Cells(LastRow, 2) = uScore
' Sort Scores from highest to lowest, then names by Alphabetical Order
Range(Cells(2, 1), Cells(LastRow, 2)).Select
Selection.Sort Key1:=Range("B2"), Order1:=xlDescending, Key2:=Range("A2") _
, Order2:=xlAscending, Header:=xlGuess, OrderCustom:=1, MatchCase:= _
False, Orientation:=xlTopToBottom, DataOption1:=xlSortNormal, DataOption2 _
:=xlSortNormal
Range("A2").Select
End Sub
Bookmarks