在没有运行的值范围内Goalseek

时间:2017-04-07 04:22:53

标签: vba excel-vba excel

我的代码有问题。当我跑步时,没有任何反应。

怎么了?

我基本上在G53范围内更改变量:N53和F54:F64并将其循环以在更改C59时将C54更改为0,然后将其粘贴到矩阵G54:N64周围。

但它没有运行!

Private Sub CheckGoalSeek()

 Dim i As Integer, j As Integer

   For i = 54 To 64
    For j = 7 To 14
       Cells(60, 3).Value = Cells(53, j).Value
       Cells(61, 3).Value = Cells(i, 6).Value
       Range("C54").GoalSeek Goal:=0, ChangingCell:=Range("C59")
       Cells(59, 3).Copy
       Cells(i, j).PasteSpecial Paste:=xlPasteValues
    Next j
   Next i

End Sub

0 个答案:

没有答案
相关问题