Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Automate GoalSeek
Hi,
When I start this For "For introw = 137 To 139" it is something wrong. Anyhelp out there? --- Sub Macro3() Dim introw As Integer Dim introw2 As Integer Dim ShtSpread As Worksheet Set ShtSpread = Sheets("2009Analyse") ShtSpread.Activate Dim Gunnar As Long Set introw = 137 Set mycell = Range("R" & "introw2") Set introw2 = 137 For introw = 137 To 139 Range("R" & "introw2).GoalSeek Goal:=0.063, ChangingCell:=Range("M"&introw) introw2 = introw2 + 1 introw = introw + 1 Next introw End Sub |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Automate GoalSeek
Set introw2 = 137 should placed before Set mycell = Range("R" & "introw2")
otherwise you will get R and Empty -- If this posting was helpful, please click on the Yes button. Regards, Michael Arch. "Gunnar Lysaker" wrote: Hi, When I start this For "For introw = 137 To 139" it is something wrong. Anyhelp out there? --- Sub Macro3() Dim introw As Integer Dim introw2 As Integer Dim ShtSpread As Worksheet Set ShtSpread = Sheets("2009Analyse") ShtSpread.Activate Dim Gunnar As Long Set introw = 137 Set mycell = Range("R" & "introw2") Set introw2 = 137 For introw = 137 To 139 Range("R" & "introw2).GoalSeek Goal:=0.063, ChangingCell:=Range("M"&introw) introw2 = introw2 + 1 introw = introw + 1 Next introw End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Another Simple GoalSeek question ?? | Excel Programming | |||
Goalseek - loop range | Excel Programming | |||
Multiple goalseek - pls pls help | Excel Programming | |||
GoalSeek in VBA | Excel Discussion (Misc queries) | |||
mimic goalseek | Excel Programming |