A
al
Could someone pls correct/improve my macro - thxs
Sub Goal_SeekRANGt()
TargetVal = Range("Setcell").Offset(0, 1).Resize(1, 12).Address
DesiredVal = Range("Changedto").Offset(0, 1).Resize(1, 12).Address
ChangeVal = Range("ByChanging").Offset(0, 1).Resize(1, 12).Address
' Loop through the goalseek method
For i = 1 To TargetVal.Columns.Count
TargetVal.Cells(i).GOALSEEK Goal:=DesiredVal.Cells(i).Value,
ChangingCell:=ChangeVal.Cells(i)
Next i
End Sub
Sub Goal_SeekRANGt()
TargetVal = Range("Setcell").Offset(0, 1).Resize(1, 12).Address
DesiredVal = Range("Changedto").Offset(0, 1).Resize(1, 12).Address
ChangeVal = Range("ByChanging").Offset(0, 1).Resize(1, 12).Address
' Loop through the goalseek method
For i = 1 To TargetVal.Columns.Count
TargetVal.Cells(i).GOALSEEK Goal:=DesiredVal.Cells(i).Value,
ChangingCell:=ChangeVal.Cells(i)
Next i
End Sub