For Each cell In Selection
MsgBox (cell.Interior.ColorIndex)
If cell.Interior.ColorIndex = xlColorIndexNone Then
ArraySize = ArraySize + 1
ReDim Preserve CellArray(ArraySize)
CellArray(ArraySize) = cell.Address
On Error Resume Next
cell.Interior.ColorIndex = 2
cell.Interior.Pattern = xlSolid
End If
Next cell
(..)
Dim iterations As Integer
iterations = 0
While iterations < ArraySize
iterations = iterations + 1
cell(CellArray(iterations)).Select
Selection.Interior.ColorIndex = 4
Wend
Sub Test()
Dim x, y As Integer
x = Array("$D$21", "$E$7")
For y = 0 To UBound(x)
Range(x(y)).Interior.ColorIndex = 4
Next y
End Sub