下载附件,按按钮执行:
Sub 按钮1_Click()Dim l As Integer, i As Integerl = Cells(Rows.Count, 1).End(3).RowFor i = 2 To l Cells(i, 3) = Cells(i, 2) - Cells(i, 1)NextEnd Sub
C1=B1-A1向下拉,就是时长天数