ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Solver Macro (https://www.excelbanter.com/excel-programming/410518-solver-macro.html)

Lacty[_2_]

Solver Macro
 
Hi Everyone,

I am trying to write a macro for the solver function with the following
parameters:

Set Target Cell: = AW20
Value of := 490,000
By Changing:= G18:AW18

Subject to:
D33:Z33 = 0
D38:Z38 =1.18
E18:AW18 = 440,000
E39:Z39 = 5,000
E40:Z40 = 50,000

Can anyone assist me with the codes for this.

Also is it possible to use range names as oppose to absolute values for some
of the contraints within the macro?

Thanks in advance for helping.

Best regards


merjet

Solver Macro
 
Download the file he
http://download.microsoft.com/downlo...s/solverex.exe
Use the macro New_Employee_Schedule() as a guide. It has constraints.
Yes, you can use a range-name in lieu of cell addresses.
Don't forget to set a reference. See http://support.microsoft.com/kb/843304
for more info.

Hth,
Merjet



Jon Peltier

Solver Macro
 
Turn on the macro recorder, run this analysis manually, then fix up the
code.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. - http://PeltierTech.com
_______


"Lacty" wrote in message
...
Hi Everyone,

I am trying to write a macro for the solver function with the following
parameters:

Set Target Cell: = AW20
Value of := 490,000
By Changing:= G18:AW18

Subject to:
D33:Z33 = 0
D38:Z38 =1.18
E18:AW18 = 440,000
E39:Z39 = 5,000
E40:Z40 = 50,000

Can anyone assist me with the codes for this.

Also is it possible to use range names as oppose to absolute values for
some
of the contraints within the macro?

Thanks in advance for helping.

Best regards





All times are GMT +1. The time now is 06:17 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com