Creating and filling in an array

I'm trying to make a ranking function that isn't as stupid as excel's built-in version. I want to input the contents of one cell (a number) and the contents of a range of cells (numbers, including the one cell), and to make a ranked list of these numbers, going from largest number to the smallest. I've written up some code in VBA (since I haven't been able to find a built-in function that does this, inexplicably), and I've run into a snag that makes absolutely no sense to me. My code is below:

Function Rank_not_dumb(cell1 As Variant, range1 As Variant)
'
' Rank_not_dumb Macro
' Macro recorded 7/22/2007 by James
'
'
Dim assgrabber()

curnum = cell1
lengthofrange = range1.Count
i = 1
rangemax = cell1
rangemin = cell1

rangemax = WorksheetFunction.Max(range1)
rangemin = WorksheetFunction.Min(range1)

While i < lengthofrange
threeve = i + 1
If range1(i, 1) > rangemax Then
rangemax = range1(i, 1)
End If
If range1(i, 1) < rangemin Then
rangemin = range1(i, 1)
End If
i = i + 1
Wend

assgrabber(1, 1) = rangemax
' sortedrange(lengthofrange, 1) = rangemin

' threeve = sortedrange(lengthofrange, 1)
i = 1
While i < lengthofrange

i = i + 1
Wend
beer2 = range1(2, 1)

Rank_not_dumb = threeve

End Function

I cannot get the assgrabber(1,1) to accept values. In fact, it seems to me that I cannot create an array of numbers and gradually fill in this array as I progress through the code. Can anyone help, please? I'm not a veteran programmer, but I'd like to think that this should be a trivial thing!

[1675 byte] By [scireja] at [2008-1-7]