Attribute VB_Name = "testcellinterior1" Sub ƒeƒXƒg() Dim i As Integer, j As Integer For i = 1 To 8 For j = 1 To 7 Cells(i, j).Interior.ColorIndex = (i - 1) * 7 + j Cells(i, j).Value = (i - 1) * 7 + j Next j Next i End Sub