Creating and filling in an array
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!

