Bonsoir,
Une proposition VBA.
Cdlt.
Public Sub CreateMonthlyCalendar()
Dim Cell As Range, iYear As Integer, iMonth As Integer, countDay As Long, n As Long
With ActiveSheet
.Cells(4, 1).CurrentRegion.Offset(1).ClearContents
If Not IsEmpty(.Cells(1, 2)) And Not IsEmpty(.Cells(2, 2)) Then
iYear = .Cells(1, 2).Value
iMonth = VBA.Month("1/" & .Cells(2, 2).Value)
countDay = VBA.Day(DateSerial(iYear, iMonth + 1, 0))
Set Cell = .Cells(5, 1)
For n = 1 To countDay
Cell.Value = DateSerial(iYear, iMonth, n)
Cell.Offset(, 1).Value = Format(Cell.Value, "ddd")
If VBA.Weekday(Cell.Value) = 2 Or VBA.Weekday(Cell.Value) = 7 Then
Set Cell = Cell.Offset(1)
Else
Cell.Offset(1).Value = Cell.Value
Cell.Offset(1, 1).Value = Format(Cell.Value, "ddd")
Set Cell = Cell.Offset(2)
End If
Next n
End If
End With
End Sub