I'm trying to automate the Goal Seek function based on the current active cell. What I want to do is have the user click a button and, based on the current active cell, the button will run the goal seek code and solve for the desired number.
The code is simple, but I am stupid when it comes to the RANGE object and using OFFSET.
Excel errors out on the word "Range" and says "Argument Not Optional" or some such thing.
How can I reference a cell that is in the same column, but one row above, the current cell and incorporate that into the Goal Seek code?
Thanks!!
Matt
The code is simple, but I am stupid when it comes to the RANGE object and using OFFSET.
Code:
ActiveCell.GoalSeek Goal:=1, ChangingCell:=ActiveCell.Range(ActiveCell).Offset(-1, 0)
Excel errors out on the word "Range" and says "Argument Not Optional" or some such thing.
How can I reference a cell that is in the same column, but one row above, the current cell and incorporate that into the Goal Seek code?
Thanks!!
Matt