Excel VBA セルの背景色を変更する
Usage
セルの背景色を変更するにはRange.Interior.ColorIndexに数字を振るか
Range.Interior.ColorIndexにRGBで指定する
Sub sample_Color()
' 1
Cells(1, 1).Interior.ColorIndex = 3
' 2
Cells(2, 1).Interior.Color = RGB(0, 100, 0)
End Sub
0を振るか、ClearFormatsで書式をクリアする
Sub sample_Color_Clear()
' 1
Cells(1, 1).Interior.ColorIndex = 0
' 2
Cells(2, 1).ClearFormats
End Sub
ClearFormatsの場合は、書式が削除される
中央揃えなども消えていることが確認できる

Reference
Interior.Color プロパティ (Excel) ColorIndex プロパティ (Excel グラフ) RGB 関数 Range.ClearFormats メソッド (Excel)