excel里如何循环遍历变量,得到输出变量
发布网友
发布时间:2022-05-02 04:23
我来回答
共1个回答
热心网友
时间:2022-06-28 04:41
Option Explicit
Dim x1, x2, x3, x4, a
Sub bianli()
a = 1
For x1 = 1 To 10
Range("A1") = x1
For x2 = 1 To 10
Range("A2") = x2
For x3 = 1 To 10
Range("A3") = x3
For x4 = 1 To 10
Range("A4") = x4
Range("B" & a) = x1 + x2 + x3 + x4
Range("C" & a) = x1 * x2 * x3 * x4
a = a + 1
Next x4
Next x3
Next x2
Next x1
End Sub