VBA Excel ColorIndex

Bardzo często potrzebujemy wrzucić kolor do komórki. Najprościej i najwydajniej działa użycie ColorIndex
Poniżej kod i jego efekt

Sub LegendaColorIndex()
    If ActiveSheet.UsedRange.Cells.Count > 1 Then
        MsgBox "Zanim uruchomisz makro tworzące legendę ColorIndex ustaw się w pustym arkuszu", vbInformation, "STOP"
        Exit Sub
    End If
 
    Dim W As Long, K As Long
    For W = 1 To 7
        For K = 1 To 8
            Cells(W, K).Value = (W - 1) * 8 + K
            Cells(W, K).Interior.ColorIndex = (W - 1) * 8 + K
            Select Case Cells(W, K).Value
                Case 1, 5, 9, 10, 11, 12, 13, 14, 16, 18, 21, 23, 25, 29, 30, 31, 32, 47, 49, 51, 52, 53, 54, 55, 56
                    Cells(W, K).Font.ColorIndex = 2
            End Select
        Next
    Next
    Dim Zakres As Range
    Set Zakres = ActiveSheet.UsedRange
    Zakres.Font.Bold = True
    Zakres.HorizontalAlignment = xlCenter
    Zakres.VerticalAlignment = xlCenter
    Zakres.RowHeight = 30
End Sub

Legenda ColorIndex