Hi,
With the following code to insert the missing dates from an ordered list
2-Apr-14
3-Apr-14
5-Apr-14
6-Apr-14
6-Apr-14
6-Apr-14
7-Apr-14
9-Apr-14
11-Apr-14
11-Apr-14
12-Apr-14
12-Apr-14
12-Apr-14
How could I change to display a period from the day= 1 to day = 30Code:Sub AddMissingDates() Dim i As Long: i = 1 Do If Cells(i + 1, "D") > Cells(i, "D") + 1 Then Rows(i + 1).Insert xlShiftDown Cells(i + 1, "D") = Cells(i, "D") + 1 End If i = i + 1 Loop Until Cells(i + 1, "D") = "" End Sub
thank you in advance
Bookmarks