Sembra di aver risolto...
Sub calcola() Dim x As Range Set x = Range("ListaNomiMese").Find(lastcaption) If x Is Nothing = False Then x.Offset(0, 2).Formula = x.Offset(0, 2).Formula - 1 Straordinario x End If Set x = Range("ListaNomiMese").Find(Bersaglio.Formula) If x Is Nothing = False Then x.Offset(0, 2).Formula = x.Offset(0, 2).Formula + 1 Straordinario x End If End Sub Private Sub Straordinario(x As Range) If x.Offset(0, 2).Formula Mod 4 = 0 Then colore = vbRed Else colore = vbBlack End If Bersaglio.Font.Color = colore End SubSì, funziona! Praticamente ogni tre turni ne scrive uno, sul Calendario, in rosso, a significare un turno straordinario.
Nessun commento:
Posta un commento