Approach 2: Using Solver
To build a model in Excel using Solver it is only necessary to have the first order conditions of the model (expressed in any form), not a closed form solution. Begin by writing the first order conditions, and listing the parameters, exogenous variables and endogenous variables. The model then be translated into an Excel model using Solver by following five steps:
Step 1: Lay Out the Model
Step 2: Fill in the Cells
Step 3: Enter the Model in Solver
Step 4: Verify the Model and Calibration
Step 5: Creating Graphics
Step 1: Lay Out the Model
First we define the cells which will hold the endogenous variables (here CX, CY and U) and exogenous variables (PX, PY and M). We have chosen the convention of using grey for endogenous variables and white for exogenous variables:
Next we define cells to contain the parameters of the model (here we have the share parameters on the utility function, and a scalar factor):
Finally, we define cells to contain the equations of the model (here demand for X and Y). We have chosen the convention of highlighting these cells green (and hiding them by default on completion of the model):