Private Sub CommandButton1_Click()
sheets("sheet1").[b15:G15].Clear
For Each mr In sheets("sheet1").Range("a2:a" & sheets("sheet1").[a1].End(4).Row)
If mr = sheets("sheet1").[a15] Then
tg = mr.Row
End If
On Error Resume Next
Next
For i = 2 To 7
sheets("sheet1").Cells(15, i) = sheets("sheet1").Cells(tg, i) - sheets("sheet1").Cells(tg - 1, i)
Next
End Sub作者: patrickccs 時間: 2014-9-10 13:24