Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Can I enforce Goal Seek to perform one iteration only?

Hi,

Can I enforce Goal Seek to perform one iteration only?

e.g. I want to have the equation in A1 result in zero (0) by changing B1.
However, because there are several possible B1 values that will yield 0 in
A1, Goal Seek will carry out several iterations and not able to yield a
single answer.

I'd like to be able to manually input an initial guessed value in B1 first,
then run Goal Seek to find the exact value, that is closest to the guessed
value, that will yield zero in A1. (I had successfully done this once using
the macro below, but somehow the second one I try to creat on the same
worksheet failed to give a single answer as aforementioned. Why is this??)

Sub Macro1()
Range("A1").Select
Range("A1").GoalSeek Goal:=0,ChangingCell:=Range("B1")
End Sub
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,582
Default Can I enforce Goal Seek to perform one iteration only?

Go to Tools menu Options Calculation, and change Maximum Iterations to
1. Record a macro while doing it, so you know how to change it, and change
it back, in code.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
http://PeltierTech.com
_______


"Sam Kuo" .(donotspam) wrote in message
...
Hi,

Can I enforce Goal Seek to perform one iteration only?

e.g. I want to have the equation in A1 result in zero (0) by changing B1.
However, because there are several possible B1 values that will yield 0 in
A1, Goal Seek will carry out several iterations and not able to yield a
single answer.

I'd like to be able to manually input an initial guessed value in B1
first,
then run Goal Seek to find the exact value, that is closest to the guessed
value, that will yield zero in A1. (I had successfully done this once
using
the macro below, but somehow the second one I try to creat on the same
worksheet failed to give a single answer as aforementioned. Why is this??)

Sub Macro1()
Range("A1").Select
Range("A1").GoalSeek Goal:=0,ChangingCell:=Range("B1")
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
vba GOAL SEEK Paulo New Users to Excel 1 July 28th 08 09:40 PM
Goal seek - Is there a bug? Petros[_2_] Excel Discussion (Misc queries) 3 February 21st 08 05:42 PM
Goal Seek LCA Excel Discussion (Misc queries) 0 June 25th 07 03:54 PM
Vba goal seek csw78 Excel Programming 9 July 15th 05 11:38 AM
Goal Seek Jake Excel Discussion (Misc queries) 1 June 12th 05 05:55 AM


All times are GMT +1. The time now is 09:22 PM.

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

About Us

"It's about Microsoft Excel"