求解器结果必须改变多个单元格

时间:2015-03-24 16:52:08

标签: excel vba excel-2010

我试图运行一个宏,其中Solver结果必须更改多个单元格。这是我在Excel 2010中创建的代码:

Dim i As Integer Dim j As Integer

For i = 21 To 32 j = 14

SolverOK SetCell:=Cells(i, j), MaxMinVal:=2, ValueOf:=0, ByChange:=Range(Cells(i, 2), Cells(i, 16), Cells(i, 29), Cells(i, 54)) SolverSolve SolverFinish KeepFinal:=1

Next i

End Sub  

但我想我有一些语法错误。你能帮帮我吗?

0 个答案:

没有答案