How to reverse data in an Array
Something like this
For i = LBound(ary) To UBound(ary) / 2
tmp = ary(UBound(ary) - i)
ary(UBound(ary) - i) = ary(i)
ary(i) = tmp
Next i
--
HTH
RP
(remove nothere from the email address if mailing direct)
"Kevin O'Neill" wrote in message
oups.com...
Dim c() As Integer
Dim ends(20) As Integer
For d = Sheet11.Cells(18, 14).Value - 1 To 0 Step -1
ends(d) = Range("A50000").End(xlUp).Row
c() = ends()
Next d 'end stud loop
ReDim Preserve c(Sheet11.Cells(18, 14).Value - 1)
The data in the table is backwards. I assume due to the step -1? Is
there a VBA command to reverse the data in c() ?
Ex. from 1,2,3...to 3,2,1...
Suggestions?
|