#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,560
Default Solver

Hi Group,

I am having a hard time programming Solver. This is the code I have so far:
Sub SolveNew()
Worksheets(ActiveSheet.Name).Activate
SolverReset
SolverOptions precision:=0.001
SolverOk SetCell:="$C$48", MaxMinVal:=3, ValueOf:="100000", ByChange:= _
"$C$32,$C$34,$C$36,$C$38,$C$40,$C$42,$C$44"
SolverAdd CellRef:="$C$33", Relation:=2, FormulaText:="$C$35"
SolverAdd CellRef:="$C$35", Relation:=2, FormulaText:="$C$37"
SolverAdd CellRef:="$C$37", Relation:=2, FormulaText:="$C$39"
SolverAdd CellRef:="$C$41", Relation:=2, FormulaText:="$C$43"
SolverAdd CellRef:="$C$43", Relation:=2, FormulaText:="$C$45"
SolverAdd CellRef:="$C$49", Relation:=2, FormulaText:="$C$48*0.35"
SolverAdd CellRef:="$C$50", Relation:=2, FormulaText:="$C$49*0.25"
SolverOk SetCell:="$C$48", MaxMinVal:=3, ValueOf:="100000", ByChange:= _
"$C$32,$C$34,$C$36,$C$38,$C$40,$C$42,$C$44"
SolverSolve
End Sub

I know there is a solution, but it keeps telling me there is not a solution.

Thanks,
David
--
David
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Solver VBA - Defining Solver Options Kyle Excel Programming 5 March 21st 08 10:41 AM
referencing Solver.xlam vs. Solver.xla - 2007 vs. 2003 Duke Carey Excel Programming 3 November 20th 07 03:48 PM
How to replace Excel solver with some free solver codes in Excel V ct2147 Excel Programming 2 November 8th 06 07:06 PM
Interesting Solver problem (Solver encounters an error) MrShorty Excel Discussion (Misc queries) 3 December 22nd 05 10:52 PM
Resetting Solver Manually to Fix Solver Bug Stratuser Excel Programming 0 September 13th 04 07:04 PM


All times are GMT +1. The time now is 03:32 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"