EXCEL中条件VBA函数

如图,B6、B7、B8为随机生成整数,求一个VBA函数,自动刷新B6、B7、B8中数据,并当F6、F7、F8均等于0时停止刷新随机数据
图片错了,是B6-D6,B7-D7、B8-D8,

Sub chushih()

Set sht = ActiveSheet

Do While sht.Range("f6") <> 0 Or sht.Range("f7") <> 0 Or sht.Range("f8") <> 0

Application.Calculation = xlCalculationAutomatic

sht.Range("b6:b8").Calculate

Loop

Application.Calculation = xlCalculationManual

End Sub

温馨提示:答案为网友推荐,仅供参考
第1个回答  2018-02-02
Function fls()
Do
DoEvents
Cells(1, 1) = Cells(1, 1)
Loop Until Cells(6, 6) = 0 And Cells(7, 6) = 0 And Cells(8, 6) = 0
End Function
第2个回答  2018-02-02
看不出这种操作的意义啊
相似回答