Worksheet Function Change Row Colors According to Value
I have done a service schedule in Excel, What i am trying to get it to do is when you put an "x" in a cell it will automatically change the color of the cell.
Below is the code i have written, Can someone throw some light on what i am doing wrong(probaly everything)
Thanks
Ian
Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim x As Integer
Dim s As Integer
Dim m As Integer
With Range("A1:z150")
If Cells.Value = x Then
Cells.Interior.ColorIndex = 34
If Cells.Value = s Then
Cells.Interior.ColorIndex = 32
End If
End If
End With
End Sub