You can do this with Visual Basic code.
If you have a workbook named Book1.xls with a worksheet named "Sheet1" then the following code will make the background of cell A1 grey.
Private Sub Clr()
Workbooks("Book1").Worksheets("Sheet1").Range("A1").Interior.Color = RGB(100, 100, 100)
Add some code round it to respond to other conditions, such as the values in other cells or even the date, and this becomes a form of conditional formatting.
If you want more help on visual basic code in Excel, I suggest that you post in the Office Software forum.