(solution) I am working in VBA assignment and need to make an array that

(solution) I am working in VBA assignment and need to make an array that

I am working in VBA assignment and need to make an array that auto populates the values 16 to 9 in reverse order. this is my current code:

 nTeams = 16                     ‘ variable to enable other size brackets

    

    ReDim arrBracket(nTeams / 2) ‘<< ReDim array to appropriate size

    

    

    ‘***** Fill the array where element 1 of the array holds the value of the

    ‘      lowest seed (e.g. if 16 teams, element 1 has a value of 16)

    

    ‘ vvv your For/Next loop below

    Dim nTeams2 As Integer ‘ Place holder for For/Next loop

    

    For i = 1 To (nTeams / 2)

        For nTeams2 = nTeams To (nTeams / 2) Step -1

            arrBracket(i) = nTeams2

        Next nTeams2

    Next i

    

The issue is that it now is only filling the array with the number 8 for each of the 8 elements, rather than 16, 15, 14, 13, etc.

Here is the loop my professor included to check the work:

For i = LBound(arrBracket()) To UBound(arrBracket())    ‘ loops through the array

        Debug.Print i & ” vs ” & arrBracket(i)              ‘ sends array info to immediate window

    Next i