code for both scenarios below
Code
Sub Scenario_Future()
'Define Variables
Dim FDT As Date 'Future Date
Dim FRow As Integer 'Find row in which our future date is in colum C
'Set Variables
FDT = Range("A7") + 89 'If we count A7 as day 1 - otherwise change to 90
FRow = Range("C:C").Find(what:=FDT, LookIn:=xlValues, lookat:=xlWhole).Row
'Add row after date
Range("C" & FRow + 1).EntireRow.Insert shift:=xlDown
End Sub
Sub Scenario_Past_And_Future()
'Define Variables
Dim FDT As Date 'Future Date
Dim PDT As Date 'Past Date
Dim FRow As Integer 'Find row in which our future date is in colum C
Dim PRow As Integer 'Find row in which our past date is in colum C
'Set Variables
FDT = Range("A7") + 89 'If we count A7 as day 1 - otherwise change to 90
PDT = Range("A7") - 89 'If we count A7 as day 1 - otherwise change to 90
FRow = Range("C:C").Find(what:=FDT, LookIn:=xlValues, lookat:=xlWhole).Row
PRow = Range("C:C").Find(what:=PDT, LookIn:=xlValues, lookat:=xlWhole).Row
'Add row after date
Range("C" & FRow + 1).EntireRow.Insert shift:=xlDown
Range("C" & PRow + 1).EntireRow.Insert shift:=xlDown
End Sub
Display More