Sub ShowColorIndex()
Dim cl As Range
Dim x As Integer
x = 0
Range("$A$3:$A$17").Select
With Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlCenter
.ColumnWidth = 17.5
.RowHeight = 20
.Font.Bold = True
End With
For Each cl In Selection
cl.Value = x
cl.Interior.ColorIndex = x
x = x + 1
Next cl
Range("$C$4:$C$17").Select
With Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlCenter
.ColumnWidth = 17.5
.Font.Bold = True
End With
For Each cl In Selection
cl.Value = x
cl.Interior.ColorIndex = x
x = x + 1
Next cl
Range("$E$4:$E$17").Select
With Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlCenter
.ColumnWidth = 17.5
.Font.Bold = True
End With
For Each cl In Selection
cl.Value = x
cl.Interior.ColorIndex = x
x = x + 1
Next cl
Range("$G$4:$G$17").Select
With Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlCenter
.ColumnWidth = 17.5
.Font.Bold = True
End With
For Each cl In Selection
cl.Value = x
cl.Interior.ColorIndex = x
x = x + 1
Next cl
Range("$D$1").Select
Selection = "COLORINDEX"
Selection.Font.Bold = True
Selection.HorizontalAlignment = xlCenter
Selection.ColumnWidth = 17.5
End Sub