Sub RandUpdate()
If ActiveSheet.Name <> "Sheet1" Then Exit Sub
If Cells(Rows.Count, 2).End(3).Row >= 50 Then
MsgBox "再来就超过第50行了"
Exit Sub
End If
Dim Arr
Arr = Application.Transpose([j1:j4])
Cells(Rows.Count, 2).End(3).Offset(1).Resize(1, 4) = Arr
End Sub
Sub Start()
Application.OnKey "{F9}", "RandUpdate"
End Sub
Sub ClearData()
Range("b8:e" & Rows.Count).ClearContents
Application.OnKey "{F9}", ""
End Sub