I have a solver below that sets the objective function equal to Project Raw Cost (inputted by the user). It then calculates the cost of each category subject to constraints.
I'm very new to VBA. I want the user to be able to click a button and it'll run the solver and, if possible, have the user input the Project Raw Cost in a cell and have the solver reference that cell to set the objective function equal to it.
What would be the macro for this? Please help! This will save a lot of time.
Thank you so much!
I'm very new to VBA. I want the user to be able to click a button and it'll run the solver and, if possible, have the user input the Project Raw Cost in a cell and have the solver reference that cell to set the objective function equal to it.
What would be the macro for this? Please help! This will save a lot of time.
Thank you so much!
Excel 2010 | ||||||
---|---|---|---|---|---|---|
A | B | C | D | |||
1 | ||||||
2 | Category | Dec. Var. | % of Total | Cost ($) | ||
3 | Mech Hdw | X1 | 7.7% | 41,580.92 | ||
4 | Ctrl Hdw | X2 | 7.7% | 41,579.92 | ||
5 | Mech Eng | X3 | 7.7% | 41,579.92 | ||
6 | Ctrl Eng | X4 | 7.7% | 41,579.92 | ||
7 | Comp Eng | X5 | 7.7% | 41,579.92 | ||
8 | Proj Mgmt | X6 | 7.7% | 41,579.92 | ||
9 | Mech Resale | X7 | 7.7% | 41,579.92 | ||
10 | Rack Resale | X8 | 7.7% | 41,579.92 | ||
11 | Ctrl Resale | X9 | 7.7% | 41,579.92 | ||
12 | Comp Resale | X10 | 7.7% | 41,579.92 | ||
13 | Mech Intall | X11 | 7.7% | 41,579.92 | ||
14 | Elec Install | X12 | 7.7% | 41,579.92 | ||
15 | Freight | X13 | 7.7% | 41,579.92 | ||
16 | Total | Y1 | 100% | |||
17 | ||||||
18 | Project Raw Cost | 540,540.00 | ||||
Sheet1 |
Last edited: