Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I would like to create a macro that, if you first place the cursor in the right cell, invokes tools, goal seek (which has three boxes to be filled in) on that cell (that cell is, by default, what's placed in the first goal seek box, so that part is done), then fills the 2nd box within goal seek with the VALUE produced by a formula in the next cell to the right, then for the third box, uses the cell that is 4 cells to the left.
At the outset, I would like it to first ask how many iterations I want and, if it's 5, after it's done what I just said would start again, 12 cells down from where the prior iteration of goal seek started. Then it would stop. The part that seems to be a problem for me is telling it how to take the value of that cell formula to the right and type that into the 2nd goal seek box. Can anyone kindly help me with that part, if not the entire macro. Thanks! Dean |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Change the Goal assignment in the GoalSeek method from a constant to a cell
value. For instance, change from Range("C9").GoalSeek Goal:=12, ChangingCell:=Range("C7") to Range("C9").GoalSeek Goal:=Range("D10").Value, ChangingCell:=Range("C7") where the goal is now based on the result in D10, instead of fixed at 12. --Bruce "Dean" wrote: I would like to create a macro that, if you first place the cursor in the right cell, invokes tools, goal seek (which has three boxes to be filled in) on that cell (that cell is, by default, what's placed in the first goal seek box, so that part is done), then fills the 2nd box within goal seek with the VALUE produced by a formula in the next cell to the right, then for the third box, uses the cell that is 4 cells to the left. At the outset, I would like it to first ask how many iterations I want and, if it's 5, after it's done what I just said would start again, 12 cells down from where the prior iteration of goal seek started. Then it would stop. The part that seems to be a problem for me is telling it how to take the value of that cell formula to the right and type that into the 2nd goal seek box. Can anyone kindly help me with that part, if not the entire macro. Thanks! Dean |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thank you, that did it. I figured the rest out myself!
"bpeltzer" wrote in message ... Change the Goal assignment in the GoalSeek method from a constant to a cell value. For instance, change from Range("C9").GoalSeek Goal:=12, ChangingCell:=Range("C7") to Range("C9").GoalSeek Goal:=Range("D10").Value, ChangingCell:=Range("C7") where the goal is now based on the result in D10, instead of fixed at 12. --Bruce "Dean" wrote: I would like to create a macro that, if you first place the cursor in the right cell, invokes tools, goal seek (which has three boxes to be filled in) on that cell (that cell is, by default, what's placed in the first goal seek box, so that part is done), then fills the 2nd box within goal seek with the VALUE produced by a formula in the next cell to the right, then for the third box, uses the cell that is 4 cells to the left. At the outset, I would like it to first ask how many iterations I want and, if it's 5, after it's done what I just said would start again, 12 cells down from where the prior iteration of goal seek started. Then it would stop. The part that seems to be a problem for me is telling it how to take the value of that cell formula to the right and type that into the 2nd goal seek box. Can anyone kindly help me with that part, if not the entire macro. Thanks! Dean |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Goal seek via macro? | Excel Discussion (Misc queries) | |||
Goal Seek in a Macro | Excel Discussion (Misc queries) | |||
Goal Seek tool in a macro | Excel Discussion (Misc queries) | |||
Goal Seek macro | Excel Programming | |||
Simple goal seek macro | Excel Programming |