Here is the sample macro. It uses a select case method to test for different inputs in the active cell.
You can add as many conditions as you want by adding more Cases.
For now I have added two cases:
Case is = "BLUE"
Case Is = "Black"
Add more of these statements before the "End Select" statement and then change the .Font.color number and the .Interior.color constants as per need. Since I do not know what exact font color and interior colors you want for different selections, I have left it to you to fill them up.
Enter this macro in the "This workbook" code window. To do this, Press Alt+F11 and in the Visual Basic window that opens, look in the Project Explorer window which is to the left side. Doubleclick on the "This Workbook" and enter this code on the blank window that opens on the righthand side.
|