Bonjour,
Voir le code ci-dessous !
C'est une condition qui t'empêche de colorer la ligne, je l'ai mise en commentaire :
Sub DerniereLigne()
Dim i&, dat As Date, nb&, fin&, nbj&, col, a&
Application.ScreenUpdating = 0
For i = 1 To Sheets.Count
If Sheets(i).Name <> "MENU" Then
With Sheets(i)
fin = .Range("A" & Rows.Count).End(3).Row
If fin > 4 Then
dat = .Range("H" & fin)
nb = Day(dat)
nbj = Day(DateSerial(Year(dat), Month(dat) + 1, 0))
'If nb = nbj And Month(dat) < Month(Date) Then <-------------------------- cette condition !
If Application.CountIf(Sheets("Menu").Range("JoursFériés"), dat) > 0 Or Weekday(dat, vbMonday) > 5 Then
.Cells(fin, 1).Resize(, 7).Interior.ColorIndex = 17 '38'<-------------ici la couleur voulue !
Else
a = 1
For Each col In Array(15, 6, 4, 43, 43, 43, 43)
.Cells(fin, a).Interior.ColorIndex = col: a = a + 1
Next col
End If
'End If
End If
End With
End If
Next i
End Sub