Hi there,
Try this Worksheet_Change event macro*
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("G18:AC53")) Is Nothing Then
With Target
Select Case .Value
Case 1
.Interior.Color = RGB(255, 0, 0) 'Red
Case 2
.Interior.Color = RGB(255, 0, 255) 'Pink
Case 3
.Interior.Color = RGB(0, 255, 0) 'Green
Case 4
.Interior.Color = RGB(255, 255, 0) 'Yellow
Case 5
.Interior.Color = RGB(0, 0, 0) 'Black
End Select
End With
End If
End Sub
* To install and subsequently modify this macro, follow these four steps:
1. Copy my code to the clipboard Ctrl + C
2. Right-click on the tab you wish the code to run on and from the shortcut menu select View Code
3. Paste Ctrl + V my code from step 1 into the blank module
4. From the File menu click Close and Return to Microsoft Excel
Regards,
Robert
Bookmarks