发布网友 发布时间:2024-10-18 22:30
共2个回答
热心网友 时间:9分钟前
vba代码如下:
Sub Com3()
Dim my_Number As String
my_Number = "3% 3.33% 3.72% 4.26% 4.62% 5.07% 5.73% 6.33% 6.99% 7.44% 8.00%"
Dim my_Arr(0 To 10)
Dim i As Single
For i = 0 To 10
my_Arr(i) = Left(Split(my_Number, " ")(i), Len(Split(my_Number, " ")(i)) - 1)
Next
Dim N1, N2, N3 As Single
Dim j As Single
j = 1
For N1 = 0 To 10
For N2 = 0 To 10
For N3 = 0 To 10
Cells(j, 1) = Format((my_Arr(N1) * 1 + my_Arr(N2) + my_Arr(N3)) / 3 / 100, "0.00%")
j = j + 1
Next
Next
Next
End Sub
热心网友 时间:1分钟前
存入数组,随机数,需要VBA实现的话先采纳下