To change a cells background color using VBA you can use the interior.colorindex property. Here’s a couple ways to change the background color of cell A1.
An example using the Range() method:
Range("A1").Interior.ColorIndex = 5
An example using the Cells() method:
Cells(1, 1).Interior.ColorIndex = 15
Need an easy way to determine what number equals what color? Check out Color Reference For Colorindex.