发布网友 发布时间:2024-03-04 06:54
共1个回答
热心网友 时间:2024-07-22 15:26
Sub m()
arr1 = Array(0, 2, 4, 6, 8)
arr2 = Array(1, 3, 5, 7, 9)
For i = 1 To 100
Randomize
r1 = Int(5 * Rnd())
Cells(i, 1) = arr1(r1) 'A列
Randomize
r2 = Int(5 * Rnd())
Cells(i, 2) = arr2(r2) 'B列
Next
End Sub