Hi,
I need to write a macro for a goal seek, where the changingcell cell will be dependant on which scenario I am using at the time.
The relevant cells which might be the changingcell cell are in a row, so I figure I should be able to make the changingcell value = an offset from the cell immediately to the left of the relevant cells (I have named this cell "Start"), and I should be able to offset by the scenario number (which is in a cell named "Scenario"). However the following doesn't work, presumably because I haven't got the offset methodology correct.
I have named "Target", the target cell which I want to seek to the value of zero.
Range("Target").GoalSeek Goal:=0, ChangingCell:=Range([Offset ("Start",0, "Scenario")])
I need to write a macro for a goal seek, where the changingcell cell will be dependant on which scenario I am using at the time.
The relevant cells which might be the changingcell cell are in a row, so I figure I should be able to make the changingcell value = an offset from the cell immediately to the left of the relevant cells (I have named this cell "Start"), and I should be able to offset by the scenario number (which is in a cell named "Scenario"). However the following doesn't work, presumably because I haven't got the offset methodology correct.
I have named "Target", the target cell which I want to seek to the value of zero.
Range("Target").GoalSeek Goal:=0, ChangingCell:=Range([Offset ("Start",0, "Scenario")])