That's a pretty reasonable first attempt but I find that you are mashing together different methods of achieving the same thing. Using half of one method and half of another rarely gets the correct result. Typically, programmers will favor one method over another. That does not mean that other methods are wrong or inefficient; just that it's easier to remember the syntax and processes from one method rather than bouncing between similar methods and possibly confusing the syntaxes as what looks like was done here.
It looks like you want to deal with a range of cells that would be selected if you were on A1 and tapped Ctrl+Shift+▼. You can a) name the range, b) assign the range to a range variable, c) deal with the coded range definition directly. Here are some examples of those three methods (there are others). The Debug.Print
lines output the range's address to the VBE's Immediate Window. Use Ctrl+G or View ► Immediate Window to view the output.
' a) Name the range.
' After this you can use the range by referring to Range("ScoresData")
Range("A1:A" & Range("A1").End(xlDown).row).Name = "ScoresData"
Debug.Print Range("ScoresData").Address
' b) Assign the range to a range type variable.
' After this you can use the range by referring to rScoresData
Dim rScoresData As Range
Set rScoresData = Range(Range("A1"), Range("A1").End(xlDown))
Debug.Print rScoresData.Address
' c) There are lots of ways to refer to the range directly
' Here are a few.
Debug.Print Range("A1:A" & Range("A1").End(xlDown).row).Address
Debug.Print Range(Range("A1"), Range("A1").End(xlDown)).Address
Debug.Print Cells(1, 1).Resize(Cells(1, 1).End(xlDown).row, 1).Address
Debug.Print Cells(1, 1).Resize(Cells(Rows.Count, 1).End(xlUp).row, 1).Address
As you can see from the Immediate Window output all of those amount to exactly the same thing. Pick one of those and memorize how to use it. At least for now, you can forget about all of the others but you should revisit them and know how they work just in case you run into them in the future.
Your copy and paste/rename method of creating the code sample you provided was discouraging. You should have at least known the correct Excel worksheet functions and how to use them on a worksheet before attempting to write VBA code to reproduce their results. Seriously; this shows a distinct lack of effort on your part. I'll provide the correct syntax for using one of your requirements, the MIN function. You will have to research and adapt what I'm providing for all of the rest. This isn't the place to learn how to get the minimum value in a column on a spreadsheet. There are lots of other sites for that. This is a place to learn how to write code that gets the minimum from a column on a worksheet.
' Declare the variable. Note that I am NOT using a reserved word as the variable's name
Dim mn As Double
' a) Use the Named Range.
mn = Application.WorksheetFunction.Min(Range("ScoresData"))
Debug.Print "Minimum value in " & Range("ScoresData").Address(0, 0, external:=True) & " is " & mn
' b) Use the Range type variable.
mn = Application.WorksheetFunction.Min(rScoresData)
Debug.Print "Minimum value in " & rScoresData.Address(0, 0, external:=True) & " is " & mn
' c) Use the full coded range definition
mn = Application.WorksheetFunction.Min(Range("A1:A" & Range("A1").End(xlDown).row))
Debug.Print "Minimum value in " & Range("A1:A" & Range("A1").End(xlDown).row).Address(0, 0, external:=True) & " is " & mn
That should be more than enough to get you started. Post back with any questions you have, noting examples, error messages, etc.