I have the following two Worksheet_Change entries, but i have no idea how to combine them so i can use them in the same workbook.
Private Sub Worksheet_Change(ByVal Target As Range)
Const WS_RANGE As String = "E26:E72,E74:E88"
On Error GoTo ws_exit
Application.EnableEvents = False
If Not Intersect(Target, Range(WS_RANGE)) Is Nothing Then
With Target
For Each cell In .Offset(0, 1).Resize(1, 24)
cell.Interior.ColorIndex = xlColorIndexNone
Next cell
End With
Call Update2
End If
ws_exit:
Application.EnableEvents = True
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
Dim Rng As Range
For Each Rng In Target
If Not Application.Intersect(Rng, Range("E26:E88")) Is Nothing Then
Application.EnableEvents = False
With Range("F" & Rng.Row & ":AC" & Rng.Row)
Select Case LCase(Rng)
Case "sick", "a/l", "training", "other"
.Interior.ColorIndex = 16
.Interior.Pattern = xlSolid
.Font.ColorIndex = 3
Case Is = ""
.ClearContents
.Interior.ColorIndex = xlNone
.Font.ColorIndex = 0
End Select
End With
End If
Next Rng
Application.EnableEvents = True
End Sub
Would be grateful for some help
Bookmarks