I guess you should have posted the whole story then folk wouldn't waste time coming up with a solution that you didn't want in the first place!
However, this goes in the worksheet module and will work with which ever range you set the target to!
Private Sub Worksheet_Change(ByVal Target As Range)
Dim R As Variant
Dim Nb As Integer
Dim Nc As integer
Nb = ActiveCell.Row
Nc = ActiveCell.Column
Set R = Cells(Nb, Nc)
If Not Intersect(Target, Range("B1:AG41")) Is Nothing Then
If Cells(Nb, 1) = "" Then
R.Interior.ColorIndex = xlNone
ElseIf Cells(Nb, 1) = "A" Then
R.Interior.ColorIndex = 3
ElseIf Cells(Nb, 1) = "S" Then
R.Interior.ColorIndex = 5
End If
End If
End Sub
Regards,
Simon
Bookmarks