#1   Report Post  
Brother
 
Posts: n/a
Default Goal Seek in a loop


I have used the following to run a simple goalseek on one line.

Range("AE3").Select
Range("AE3").GoalSeek Goal:=0, ChangingCell:=Range("AA3")

Is it possible to get this doen in a loop acting on every entry in column AE?
  #2   Report Post  
Bill Martin -- (Remove NOSPAM from address)
 
Posts: n/a
Default

Brother wrote:
I have used the following to run a simple goalseek on one line.

Range("AE3").Select
Range("AE3").GoalSeek Goal:=0, ChangingCell:=Range("AA3")

Is it possible to get this doen in a loop acting on every entry in column AE?



How about something of the form:

x=3
y$ = "AE" + FORMAT(x,"#")
while range(y$) 0
Do your stuff here
x = x+1
wend

Bill
  #3   Report Post  
Bill Martin -- (Remove NOSPAM from address)
 
Posts: n/a
Default

Brother wrote:
I have used the following to run a simple goalseek on one line.

Range("AE3").Select
Range("AE3").GoalSeek Goal:=0, ChangingCell:=Range("AA3")

Is it possible to get this doen in a loop acting on every entry in column AE?



How about something of the form:

x=3
y$ = "AE" + FORMAT(x,"#")
while range(y$) 0
Do your stuff here
x = x+1
y$ = "AE" + FORMAT(x,"#")
wend

Bill
  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,388
Default Goal Seek in a loop

Bill,

How would you change the macro if the data is in rows instead of columns?

Dave

"Bill Martin -- (Remove NOSPAM from addre" wrote:

Brother wrote:
I have used the following to run a simple goalseek on one line.

Range("AE3").Select
Range("AE3").GoalSeek Goal:=0, ChangingCell:=Range("AA3")

Is it possible to get this doen in a loop acting on every entry in column AE?



How about something of the form:

x=3
y$ = "AE" + FORMAT(x,"#")
while range(y$) 0
Do your stuff here
x = x+1
y$ = "AE" + FORMAT(x,"#")
wend

Bill

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
Goal Seek Jake Excel Discussion (Misc queries) 1 June 12th 05 05:55 AM
goal seek wont calculate an accurate value past 3 decimal places Joe Browning Excel Discussion (Misc queries) 1 April 13th 05 07:29 AM
Goal Seek on Multiple Cells newtoloop Excel Worksheet Functions 0 February 17th 05 10:01 PM
Goal Seek - Why make the PV negative? Mytpoet67 Excel Discussion (Misc queries) 1 January 13th 05 02:51 AM
Goal Seek - reference a cell for "To value" field? cchristensen Excel Worksheet Functions 1 November 5th 04 07:27 PM


All times are GMT +1. The time now is 02:33 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"