I cannot find a good example online anywhere. I have a list called parameters = {10, 13, 8, 9, 11, 12, 14}. As you can see, the numbers are random. I would like to use the For Each statement to use that random list of numbers somehow in that specific order.

For example, if I wanted to simply extract those numbers onto an excel sheet, my code would look something like this:


Sub ForEachStatementLoop()

Dim parameters (10, 13, 8, 9, 11, 12, 14) As Integer
Dim element As Variant

a = 1
For Each element In parameters

    Cells(a, 1) = parameters
    
    a = a + 1

Next element

End Sub
My code does not work. I think I am declaring variables incorrectly. If you can think of another loop that is better, then that's fine. Please note that this is just a simple example, though, and I would like to expand on this once I have the basics figured out.