以下為Kubi 大大高手設計程式
Sub test()
Randomize
Dim arr(1 To 15, 1 To 20)
v = 20
For r = 2 To 16
tpm = Cells(r, 3).Value * 2 + 0.1
nt = Cells(r, 2).Value - Cells(r, 3).Value
For i = 1 To UBound(arr)
For j = 1 To UBound(arr, 2)
arr(i, j) = nt + Round(Rnd * tpm, 1)
Next j
Next i
Cells(v, 3).Resize(UBound(arr), UBound(arr, 2)) = arr
v = v + 18
Next r
End Sub作者: a5007185 時間: 2018-7-29 01:11