I hope the title to my thread is sufficient.
My code below checks to see if any change occurrs between Cells L5:GR12. Am I able to speed up the calculation time in anyway? I was trying to exit my for loop but that wasn't working for me.
Private Sub Worksheet_Change(ByVal Target As Range)
Dim iColor, TheRow As Integer
Set Shifts = Range("L5:GR12")
For Each cell In Shifts
Select Case cell.Value
Case "D"
iColor = 7 'Pink
cell.Font.ColorIndex = 1 'Black
Select Case cell.Row
Case 5
Sheets("Audit~Jan-Jun").Cells(200, cell.Column - 8).ClearContents
Sheets("Audit~Jan-Jun").Cells(201, cell.Column - 8).ClearContents
Sheets("Audit~Jan-Jun").Cells(202, cell.Column - 8).ClearContents
Sheets("Audit~Jan-Jun").Cells(203, cell.Column - 8).ClearContents
End Select
Case "N"
iColor = 4 'Green
cell.Font.ColorIndex = 1 'Black
Case "S", "S10"
iColor = 42 'Turquoise
cell.Font.ColorIndex = 1 'Black
Case "V", "V8", "V10", "V12", "H8", "H10", "H12", "E8", "E12"
iColor = 40 'Tan
cell.Font.ColorIndex = 1 'Black
Case "SH"
iColor = 24 'Ice Blue
cell.Font.ColorIndex = 3 'Red
Case "SD4", "SD5", "SD6", "SD7", "SD8", "SD9"
iColor = 27 'Yellow
cell.Font.ColorIndex = 1 'Black
Case "SD10", "SD11", "SD12", "SD13", "SD14", "SD15"
iColor = 27 'Yellow
cell.Font.ColorIndex = 1 'Black
Case Else
iColor = 2 'White
cell.Font.ColorIndex = 1 'Black
End Select
cell.Interior.ColorIndex = iColor
Next
End Sub
Bookmarks