P
Peta
Hi - can anyone help please
I've tried Subject: RE: More than 6 conditional Formats....VBA Coding Advise
please 1/5/2006 7:08 PM PST
By: JulieD In: microsoft.public.excel.newusers
Private Sub Worksheet_Change(ByVal Target As Range)
On Error GoTo Err_Handler
If Not Intersect(Target, Range("K1:K20")) Is Nothing Then
Application.EnableEvents = False
i = Target.Row
Select Case Target.Value
Case "Yes"
Range("A" & i & ":M" & i).Interior.ColorIndex = 6
Case "No"
Range("A" & i & ":M" & i).Interior.ColorIndex = 12
Case "W"
Range("A" & i & ":M" & i).Interior.ColorIndex = 18
Case "X"
Range("A" & i & ":M" & i).Interior.ColorIndex = 22
Case "Y"
Range("A" & i & ":M" & i).Interior.ColorIndex = 26
Case "Z"
Range("A" & i & ":M" & i).Interior.ColorIndex = 30
Case Else
Range("A" & i & ":M" & i).Interior.ColorIndex = xlNone
End Select
End If
Err_Handler:
Application.EnableEvents = True
End Sub
but doesn't work - I'm using XP - Excel 2003
it won't even debug - step into
any suggestion welcome
thanks
I've tried Subject: RE: More than 6 conditional Formats....VBA Coding Advise
please 1/5/2006 7:08 PM PST
By: JulieD In: microsoft.public.excel.newusers
Private Sub Worksheet_Change(ByVal Target As Range)
On Error GoTo Err_Handler
If Not Intersect(Target, Range("K1:K20")) Is Nothing Then
Application.EnableEvents = False
i = Target.Row
Select Case Target.Value
Case "Yes"
Range("A" & i & ":M" & i).Interior.ColorIndex = 6
Case "No"
Range("A" & i & ":M" & i).Interior.ColorIndex = 12
Case "W"
Range("A" & i & ":M" & i).Interior.ColorIndex = 18
Case "X"
Range("A" & i & ":M" & i).Interior.ColorIndex = 22
Case "Y"
Range("A" & i & ":M" & i).Interior.ColorIndex = 26
Case "Z"
Range("A" & i & ":M" & i).Interior.ColorIndex = 30
Case Else
Range("A" & i & ":M" & i).Interior.ColorIndex = xlNone
End Select
End If
Err_Handler:
Application.EnableEvents = True
End Sub
but doesn't work - I'm using XP - Excel 2003
it won't even debug - step into
any suggestion welcome
thanks