Lets suppose that cell "A1" contains a formula whose result depends on cell "B1".
Range("A1").GoalSeek Goal:=0.5, _
Goal Seek will return the result (eithre True or False) according to whether the goal value is achieved or not.
Goal seek has the disadvantage that only a single dependent cell is varied.
The main problem with calling the function from VBA is that this is not documented anywhere.
It is often best to record a macro to obtain the desired result.
© 2021 Better Solutions Limited. All Rights Reserved. © 2021 Better Solutions Limited TopPrevNext