Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 791
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Another Simple GoalSeek question ?? monir Excel Programming 2 November 25th 08 05:10 PM
Goalseek - loop range al Excel Programming 0 July 27th 07 04:35 AM
Multiple goalseek - pls pls help [email protected] Excel Programming 0 July 26th 07 09:58 PM
GoalSeek in VBA [email protected] Excel Discussion (Misc queries) 1 July 20th 06 05:13 AM
mimic goalseek Monique Excel Programming 6 August 25th 05 07:11 PM


All times are GMT +1. The time now is 06:26 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"