Try adding the following macro to your 'Inputs' worksheet's code module:
Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim StartDate As Date, Duration As Long, i As Long
With ActiveSheet
If Intersect(Target, .Range("D9:D11")) Is Nothing Then Exit Sub
If ActiveSheet.Range("D9") = "" Then Exit Sub
If ActiveSheet.Range("D10") < 1 Then Exit Sub
StartDate = .Range("D9").Value
Duration = .Range("D11").Value
End With
With Worksheets("O&M")
.Range("A5:D" & .UsedRange.Rows.Count).ClearContents
.Range("A5").Value = StartDate
.Range("B5").Value = DateAdd("yyyy", 1, StartDate) - 1
.Range("C" & i + 5).Value = Format(StartDate, "yyyy")
.Range("D" & i + 5).Value = 1
For i = 1 To Duration - 1
.Range("A" & i + 5).Value = DateAdd("yyyy", i, StartDate)
.Range("B" & i + 5).Value = DateAdd("yyyy", i + 1, StartDate) - 1
.Range("C" & i + 5).Value = Format(DateAdd("yyyy", i, StartDate), "yyyy")
.Range("D" & i + 5).Value = i + 1
Next
End With
End Sub
The macro will run automatically any time you select a cell in the D9-D11 range.