Is it possible to perform a goal seek in excel when the value is caluculated by a macro

spurs

Active Member
Joined
Oct 18, 2006
Messages
479
Office Version
  1. 2016
  2. 2013
  3. 2010
  4. 2007
  5. 2003 or older
Platform
  1. Windows
I use goal seek frequently and i noticed that if a function is used in a cell the goal seek works but if calculated by a subroutine it cannot

Is there a way to calculate via goal seek a value calculated through a subroutine?
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
Yes, there is a way to use Goal Seek to calculate a value calculated through a subroutine. You can create a VBA subroutine to run Goal Seek anytime there is a change on a worksheet. Alternatively, you can also enable iterative calculations in Excel Options. This will allow Excel to handle circular references, or cell formulas that refer to their own result as an input to the cell formula. However, you need to set the maximum number of iterations and the maximum change (accuracy) appropriately to avoid a very long iterative loop.
 
Upvote 0
Yes, there is a way to use Goal Seek to calculate a value calculated through a subroutine. You can create a VBA subroutine to run Goal Seek anytime there is a change on a worksheet. Alternatively, you can also enable iterative calculations in Excel Options. This will allow Excel to handle circular references, or cell formulas that refer to their own result as an input to the cell formula. However, you need to set the maximum number of iterations and the maximum change (accuracy) appropriately to avoid a very long iterative loop.
Are you saying that the vba code I need to create would goal seak inside my code as opposed to use the built in excel method?
 
Upvote 0

Forum statistics

Threads
1,223,886
Messages
6,175,196
Members
452,616
Latest member
intern444

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top