Buongiorno a tutti, ho un problema ho delle macro (vedi sotto) per inserire in automatico giorno e colore cella per dei nominativi, vedi allegato, o inserto due nominativi nuovi (in allegato cerchiati di rosso) ma non mi riconosce la macro, sono le ultime due. Spero di essere riuscito a spiegarmi. Non capisco perché non le accetta. Se qualcuno può aiutarmi grazie in anticipo.
Macro e pulsante:
Sub colora()
Dim rng As Range
Dim cel As Range
Range("H7:U37").Interior.ColorIndex = xlNone
Set rng = Range("H7:U37")
For Each cel In rng
Select Case cel.Column
Case Is = 8
If Cells(cel.Row, 7).Value = "martedì" Then
cel.Interior.ColorIndex = 6
End If
Case Is = 10
If Cells(cel.Row, 7).Value = "venerdì" Then
cel.Interior.ColorIndex = 43
End If
Case Is = 12
If Cells(cel.Row, 7).Value = "lunedì" Then
cel.Interior.ColorIndex = 46
End If
Case Is = 14
If Cells(cel.Row, 7).Value = "sabato" Then
cel.Interior.ColorIndex = 33
End If
Case Is = 16
If Cells(cel.Row, 7).Value = "martedì" Then
cel.Interior.ColorIndex = 44
End If
Case Is = 18
If Cells(cel.Row, 7).Value = "giovedì" Then
cel.Interior.ColorIndex = 42
End If
Case Is = 20
If Cells(cel.Row, 7).Value = "lunedì" Or Cells(cel.Row, 7).Value = "giovedì" Then
cel.Interior.ColorIndex = 40
End If
Case Is = 24
If Cells(cel.Row, 7).Value = "mercoledì" Then
cel.Interior.ColorIndex = 6
End If
Case Is = 26
If Cells(cel.Row, 7).Value = "mercoledì" Then
cel.Interior.ColorIndex = 6
End If
End Select
Next cel
End Sub