Sub Z()
Dim iRed As Long
Dim iGrn As Long
Dim iBlu As Long
Dim iRow As Long
Dim iCol As Long
iRow = 1
For iRed = 0 To 255 Step 16
For iGrn = 0 To 255 Step 16
For iBlu = 0 To 255 Step 16
iCol = iCol + 1
If iCol > 64 Then
iCol = 1
iRow = iRow + 1
End If
Cells(iRow, iCol).Interior.Color = RGB(iRed, iGrn, iBlu)
Next iBlu
Next iGrn
Next iRed
End Sub
Sub Z()
Dim i As Long
Dim j As Long
Dim iRed As Long
Dim iGrn As Long
Dim iBlu As Long
For i = 0 To 63
For j = 0 To 63
iRed = 16 * (i Mod 16) + 15
iGrn = j \ 16 + 64 * (i \ 16) + 15
iBlu = 16 * (j Mod 16) + 15
Cells(i + 1, j + 1).Interior.Color = RGB(iRed, iGrn, iBlu)
Next j
Next i
End Sub