Hi,

Maybe I hid the code:
Code:
Dim list   As Long:    list = 21
I used the variable list to indicate the beginning of the table
To insert the missing days with the code
Code:
If Day(ed) > 1 Then
        c.Offset(1).Resize(Day(ed - 1)).EntireRow.Insert
        Cells(list, r.Column) = DateSerial(Year(ed), Month(ed), 1)
        Cells(list, r.Column).AutoFill Cells(list, r.Column).Resize(Day(ed))
    End If
The code works correctly
Thank you so much