Sub Macro1()
Dim Lrow As Long
Range("C2").FormulaR1C1 = "=RC[-1]-RC[-2]"
Range("D2").FormulaR1C1 = "=IF(RC[-1]>30,""正常"",IF(RC[-1]<0,""已经过期"",""""))"
Lrow = Range("A65536").End(xlUp).Row
Range("C2" & Lrow).Select
Selection.FillDown
Columns("C:C").Select
Selection.NumberFormatLocal = "G/通用格式"
Range("C2").Select
End Sub