ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Goal Seek - reference a cell for "To value" field? (https://www.excelbanter.com/excel-worksheet-functions/5790-goal-seek-reference-cell-%22-value%22-field.html)

cchristensen

Goal Seek - reference a cell for "To value" field?
 
Is it possible to create a macro using goal seek that will automatically
reference a cell in the worksheet for the "To value" field, rather than
having to enter a value? I've tried copying/pasting a value into this field
while recording a macro, but the dialog box doesn't allow that.

My goal is to allow a user to enter a target value (retail price, in this
case), then have a macro activate solver to find the minimum number of units.

Any ideas?

Niek Otten

There are many ways to do that using VBA.
But there is a way to do that just using formulas: introduce a formula which
subtracts the result from a cell (in which the required result is stored)
and then goalseek for the value zero.

--

Kind Regards,

Niek Otten

Microsoft MVP - Excel

"cchristensen" wrote in message
...
Is it possible to create a macro using goal seek that will automatically
reference a cell in the worksheet for the "To value" field, rather than
having to enter a value? I've tried copying/pasting a value into this
field
while recording a macro, but the dialog box doesn't allow that.

My goal is to allow a user to enter a target value (retail price, in this
case), then have a macro activate solver to find the minimum number of
units.

Any ideas?





All times are GMT +1. The time now is 10:07 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com