zoom38
02-13-2006, 05:28 PM
How do I update my code to only include the range B8:O34. Because it is set for the entire worksheet it is causing errors elsewhere.
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
Select Case Target.Value
Case "V.5", "V1" To "V999"
Target.Interior.ColorIndex = 35
Case "PL.5", "PL1" To "PL999"
Target.Interior.ColorIndex = 34
Case "SL.5", "SL1" To "SL999", "FS.5", "FS1" To "FS999"
Target.Interior.ColorIndex = 36
Case Is = "ML.5", "ML1" To "ML999"
Target.Interior.ColorIndex = 24
Case Else
'No conditions met, so make it normal
Target.Interior.ColorIndex = -4142
End Select
End Sub
Thanks
Gary
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
Select Case Target.Value
Case "V.5", "V1" To "V999"
Target.Interior.ColorIndex = 35
Case "PL.5", "PL1" To "PL999"
Target.Interior.ColorIndex = 34
Case "SL.5", "SL1" To "SL999", "FS.5", "FS1" To "FS999"
Target.Interior.ColorIndex = 36
Case Is = "ML.5", "ML1" To "ML999"
Target.Interior.ColorIndex = 24
Case Else
'No conditions met, so make it normal
Target.Interior.ColorIndex = -4142
End Select
End Sub
Thanks
Gary