2,461
社区成员
发帖
与我相关
我的任务
分享
Private Sub CommandButton1_Click()
Dim i As Integer
Dim j As Integer
Dim n As Integer
Dim m As Integer
m = 5
Randomize
For i = 1 To 9
n = n + 1
Cells(n, 2) = Cells(i, 1)
For j = 1 To m - 1
n = n + 1
Cells(n, 2) = Cells(i, 1) + (Cells(i + 1, 1) - Cells(i, 1)) * Rnd
Next j
Next i
n = n + 1
Cells(n, 2) = Cells(i, 1)
End Sub
Private Sub CommandButton1_Click()
Dim i As Integer
Dim j As Integer
Dim n As Integer
Dim m As Integer
m = 5
For i = 1 To 9
For j = 0 To m - 1
n = n + 1
Cells(n, 2) = Cells(i, 1) + (Cells(i + 1, 1) - Cells(i, 1)) / m * j
Next j
Next i
n = n + 1
Cells(n, 2) = Cells(i, 1)
End Sub
Private Sub CommandButton1_Click()
Dim i As Integer
Dim j As Integer
Dim n As Integer
Dim m As Integer
m = 3
For i = 1 To 9 '要分的数少1
'先添上要分的数
n = n + 1
Cells(n, 2) = Cells(i, 1)
'添上分的数
For j = 1 To m - 1
n = n + 1
Cells(n, 2) = Cells(i, 1) + (Cells(i + 1, 1) - Cells(i, 1)) / m * j
Next j
Next i
'添上最后要分的数
n = n + 1
Cells(n, 2) = Cells(i, 1)
End Sub
Private Sub CommandButton1_Click()
Dim i As Integer
Dim j As Integer
Dim n As Integer
Dim m As Integer
m = 5
For i = 1 To 9
n = n + 1
Cells(n, 2) = Cells(i, 1)
For j = 1 To m - 1
n = n + 1
Cells(n, 2) = Cells(i, 1) + (Cells(i + 1, 1) - Cells(i, 1)) / m * j
Next j
Next i
n = n + 1
Cells(n, 2) = Cells(i, 1)
End Sub