Bonjour,
Une autre approche.
A tester !...
Cdlt.
Public Sub TEST()
Dim wb As Workbook, ws As Worksheet
Dim dt As Date, dow As Integer
Set wb = ActiveWorkbook
Set ws = wb.Worksheets("Feuil1")
dt = Date - WorksheetFunction.Weekday(Date, 3)
dow = WorksheetFunction.Weekday(Date, 2)
Select Case dow
Case 5:
With ws
.Cells(2).Value = WorksheetFunction.WorkDay_Intl(Date, 1, "0111111")
.Cells(4).Value = WorksheetFunction.WorkDay_Intl(Date, 1, "1011111")
.Cells(6).Value = WorksheetFunction.WorkDay_Intl(Date, 1, "1110111")
End With
Case Else:
With ws
.Cells(2).Value = WorksheetFunction.WorkDay_Intl(dt - 1, 1, "0111111")
.Cells(4).Value = WorksheetFunction.WorkDay_Intl(dt - 1, 1, "1011111")
.Cells(6).Value = WorksheetFunction.WorkDay_Intl(dt - 1, 1, "1110111")
End With
End Select
Set wb = Nothing: Set ws = Nothing
End Sub