Here's my code. Sorry it's so long, I'm a rookie.
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 9 Then
Target(1, 6).FormulaR1C1 =
"=OR(AND(MONTH(RC[-5])=RC[-4],YEAR(RC[-5])=RC[-3])," _
& "AND(MONTH(RC[-5])=RC[-2],YEAR(RC[-5])=RC[-1]))"
Target(1, 5).FormulaR1C1 =
"=IF(RC[-4]="""","""",IF(MONTH(TODAY())=2,YEAR(TODAY())-1,IF(MONTH(TODA
Y())=1,YEAR(TODAY())-1,YEAR(TODAY()))))"
Target(1, 4).FormulaR1C1 =
"=IF(RC[-3]="""","""",IF(MONTH(TODAY())=2,12,IF(MONTH(TODAY())=1,11,MON
TH(TODAY())-2)))"
Target(1, 3).FormulaR1C1 =
"=IF(RC[-2]="""","""",IF(MONTH(TODAY())=1,YEAR(TODAY())-1,YEAR(TODAY())
))"
Target(1, 2).FormulaR1C1 =
"=IF(RC9="""","""",IF(MONTH(TODAY())=1,12,MONTH(TODAY())-1))"
Target(1, 7).FormulaR1C1 = "=IF(RC[-6]="""",,RC[-6])"
Target(1, 20).FormulaR1C1 = "=TODAY()-RC[-19]"
Target(1, 14).FormulaR1C1 =
"=OR(AND(MONTH(RC[-5])=RC[-4],YEAR(RC[-5])=RC[-3])," _
& "AND(MONTH(RC[-5])=RC[-2],YEAR(RC[-5])=RC[-1]))"
ElseIf Target.Column = 17 Then
Target(1, 5).FormulaR1C1 =
"=IF(RC[-4]="""","""",IF(MONTH(TODAY())=2,YEAR(TODAY())-1,IF(MONTH(TODA
Y())=1,YEAR(TODAY())-1,YEAR(TODAY()))))"
Target(1, 4).FormulaR1C1 =
"=IF(RC[-3]="""","""",IF(MONTH(TODAY())=2,12,IF(MONTH(TODAY())=1,11,MON
TH(TODAY())-2)))"
Target(1, 3).FormulaR1C1 =
"=IF(RC[-2]="""","""",IF(MONTH(TODAY())=1,YEAR(TODAY())-1,YEAR(TODAY())
))"
Target(1, 2).FormulaR1C1 =
"=IF(RC9="""","""",IF(MONTH(TODAY())=1,12,MONTH(TODAY())-1))"
Target(1, 7).FormulaR1C1 = "=IF(RC[-6]="""",,RC[-6])"
Target(1, 9).FormulaR1C1 =
"=(RC[-8]-RC[-16])*24+((HOUR(RC[-1])-HOUR(RC[-9]))+((MINUTE(RC[-1])-MIN
UTE(RC[-9]))/60))"
Target(1, 10).FormulaR1C1 = "=IF(RC[-1]>=0,RC[-1]/24,"""")"
Target(1, 11).FormulaR1C1 =