Give this macro a try...
Code:Sub FillInStartEndDates() Dim BeginDate As Date, StopDate As Date, NumberOfDays As Long Const StartDateCell As String = "C9" BeginDate = Range("B3").Value StopDate = Range("C3").Value NumberOfDays = StopDate - BeginDate + 1 Range(StartDateCell).Resize(2).EntireRow.Clear With Range(StartDateCell) .Offset(1).Value = BeginDate .Offset(1).NumberFormat = "d-mmm" .Offset(1).AutoFill Destination:=.Offset(1).Resize(, NumberOfDays), Type:=xlFillDefault With Range(StartDateCell).Resize(, NumberOfDays) .Interior.Color = 10147522 .Offset(1).Interior.Color = 15261110 .FormulaR1C1 = "=TEXT(R[1]C,""ddd"")" .Resize(2).HorizontalAlignment = xlCenter End With End With End Sub




Reply With Quote

Bookmarks