Hey! Im very new in VBA and i'm trying to do the following:
i want to find the grey colored cells in a column, to use their rownumber as a sorting rank: lowest rownumber is the first value, second lowest rownumber is the second value and so on.
it looks something like this:
for i = 1 To 5
if Cells(i,1).Interior.Color= RGB(xxx,xxx,xxx)
myArray = Cells(i,1).Row
End IF
Next i


The size of myArray is not fixed and depends on how many grey cells are found. With this approach i only get the last value it finds. If i then try to use the Small function for any value that is not 1, it gives erros, which i think are because myArray is only 1 value large while it should be bigger.
When i try to write it as myArray(j) it gives also erros, since j changes. What is the best way to do this in vba?
Thank you in advance.