Hi loungers…I am using the following code (that I got from Hans) as a worksheet change event on Sheet 1 … it triggers color changes to cells on Sheet 1 when you input the data shown. My question follows this code:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim oCell As Range
If Not Intersect(Target, Range(“e13:y272”)) Is Nothing Then
For Each oCell In Intersect(Target, Range(“e13:y272”)).Cells
If UCase(oCell) Like “CON*” Then
oCell.Interior.ColorIndex = 5
oCell.Font.ColorIndex = 2
Else
Select Case oCell
Case “Away”, “away”, “N/S”, “n/s”
oCell.Interior.ColorIndex = 4
oCell.Font.ColorIndex = 1
Case “Xvac”, “xvac”, “Xcon”, “xcon”
oCell.Interior.ColorIndex = 1
oCell.Font.ColorIndex = 2
Case “VAC”, “vac”, “Vac”
oCell.Interior.ColorIndex = 15
oCell.Font.ColorIndex = 1
Case “CJ”
oCell.Interior.ColorIndex = 3
oCell.Font.ColorIndex = 2
Case Else
oCell.Interior.ColorIndex = xlColorIndexAutomatic
oCell.Font.ColorIndex = 1
End Select
End If
Next oCell
End If
End Sub
……..using formula on Sheet 2, the data from Sheet 1 appears on Sheet 2 in a slightly different format….I would like the colors that appear on Sheet 1 to also appear on Sheet 2….simply copying this code to Sheet 2 doesn’t do the trick (presumably b/c it relates to entries made on Sheet 1 only)….how can I modify this code to make it workable on Sheet 2 so that, for example, when VAC appears on Sheet 2, it is black-on-grey..??..?? etc etc….thank you for your help.