Using Excel Solver and VBA User Defined Functions
Using Excel Solver and VBA User Defined Functions
(OP)
I would like to use Excel's Solver to minimize the sum of the square errors between observed data and a model. I know how to do this if the model is an Excel function in cells in the worksheet. However, I am working with a very complicated series of functions that I would like to be user-designed functions (UDF) written in VBA. Is it possible to use Solver to optimize a cell in an Excel file that is a function of a VBA UDF? I have attached a very simple model illustrating what I am trying to do, where "model" is a VBA UDF, and I would like to use Solver to minimize D9 by changing the parameters G4 and G5.
Thanks very much for any help you can provide.
Thanks very much for any help you can provide.
RE: Using Excel Solver and VBA User Defined Functions
TTFN
FAQ731-376: Eng-Tips.com Forum Policies
RE: Using Excel Solver and VBA User Defined Functions
RE: Using Excel Solver and VBA User Defined Functions
TTFN
FAQ731-376: Eng-Tips.com Forum Policies
RE: Using Excel Solver and VBA User Defined Functions
TTFN
FAQ731-376: Eng-Tips.com Forum Policies
RE: Using Excel Solver and VBA User Defined Functions
RE: Using Excel Solver and VBA User Defined Functions
TTFN
FAQ731-376: Eng-Tips.com Forum Policies
RE: Using Excel Solver and VBA User Defined Functions
For anyone who might be interested, here is the working file. The parameters that Solver is going to change must be passed to the function as arguments.
RE: Using Excel Solver and VBA User Defined Functions
However I think that your approach would be more "robust" if you set the Solver to minimise your target cell rather than trying to force it to zero.
RE: Using Excel Solver and VBA User Defined Functions
TTFN
FAQ731-376: Eng-Tips.com Forum Policies