Good afternoon
I have the code below in a worksheet which works fine. I am trying to build an automatic report function that gathers data from various other worksheets by using the =sheet1!C6 formula for example. I have put this code into the VBA area for the report worksheet but nothing happens (I am expecting for example that if an H is entered for holiday on an employees summary and the cell is coloured red with a white font the same thing would happen on the report because the =sheet1!C6 would =H and the code below would be used)
Hope that makes some sense
For Each cel In Range("C6:AG144").Cells If IsError(cel.Value) Then ' do you want to color these? Else Select Case UCase(cel.Value) Case "H" cel.Font.ColorIndex = 2 cel.Interior.ColorIndex = 3 Case "S" cel.Font.ColorIndex = 2 cel.Interior.ColorIndex = 51 Case "M" cel.Font.ColorIndex = 2 cel.Interior.ColorIndex = 26 Case "P" cel.Font.ColorIndex = 2 cel.Interior.ColorIndex = 9 Case "U" cel.Font.ColorIndex = 2 cel.Interior.ColorIndex = 1 Case "A" cel.Font.ColorIndex = 2 cel.Interior.ColorIndex = 16 Case "B" cel.Font.ColorIndex = 2 cel.Interior.ColorIndex = 13 Case "T" cel.Font.ColorIndex = 2 cel.Interior.ColorIndex = 25 Case "C" cel.Font.ColorIndex = 2 cel.Interior.ColorIndex = 49 Case "L" cel.Font.ColorIndex = 2 cel.Interior.ColorIndex = 56 Case "X" cel.Font.ColorIndex = 2 cel.Interior.ColorIndex = 2 Case Else cel.Font.ColorIndex = 1 End Select End If Next cel End Sub