Когда я запускаю приведенный ниже код, появляется ошибка "Name argument not found
" для SetCell:="$I$3"
.
Sub Simple_Exponential_Smoothing()
Dim x As Integer
Dim lastrow As Integer
Application.ScreenUpdating = False
Sheets("COV_0.2").Cells(1, 49).Value = "MAD"
Sheets("COV_0.2").Cells(1, 50).Value = "Alpha"
lastrow = Sheets("COV_0.2").Cells(Rows.Count, 2).End(xlUp).Row
For x = 2 To lastrow
If Sheets("COV_0.2").Cells(x, 31).Value <> "S4" Then
Range("G" & x & ":AD" & x).Select
Selection.Copy
Sheets("Analysis_Constant").Select
Range("C4").Select
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=True
Application.Run "Solver.xlam!SolverReset"
'***ERROR ON THE FOLLOWING LINE: `Name argument not found`
Application.Run "Solver.xlam!SolverOk", SetCell:="$I$3", _
MaxMinVal:=2, ValueOf:=0, ByChange:="$G$1", Engine:=3, _
EngineDesc:="Evolutionary"
Application.Run "Solver.xlam!SolverAdd", CellRef:="$G$1", _
Relation:=1, FormulaText:="0.9"
Application.Run "Solver.xlam!SolverAdd", CellRef:="$G$1", _
Relation:=3, FormulaText:="0.1"
SolverSolve True