A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
Two options:
You can allow to format cells, when you protect the worksheet, on you can let the macro unprotect the worksheet before it change the color, and protect it before End Sub.
ActiveSheet.UnProtect Password:="JustMe"
Other code
ActiveSheet.Protect Password:="JustMe"
I guess that the second solution is best, if you want to prevent the user from formatting the unlocked cells.