EXCEL高阶问题,在线跪求高手解答。急急急~~ 我想给孩子做个100以内连加连减随机出题器,但是问题是老是得

2020-04-22 教育 77阅读
Sub ct()
Randomize
For i = 1 To 25
a = Int(Rnd() * 100 + 1)
b = Int(Rnd() * (100 - 1) - a)
c = Int(Rnd() * (100 - a - b) - a - b)
Cells(i, 1) = a & IIf(b >= 0, "+" & b, b) & IIf(c >= 0, "+" & c, c)
Cells(i, 3) = a & IIf(b >= 0, "+" & b, b) & IIf(c >= 0, "+" & c, c)
Cells(i, 5) = a & IIf(b >= 0, "+" & b, b) & IIf(c >= 0, "+" & c, c)
Cells(i, 7) = a & IIf(b >= 0, "+" & b, b) & IIf(c >= 0, "+" & c, c)
Next i
End Sub
插入模块,你懂得
声明:你问我答网所有作品(图文、音视频)均由用户自行上传分享,仅供网友学习交流。若您的权利被侵害,请联系fangmu6661024@163.com