LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Solver iteration in VBA macro

The following VBA code runs Solver for one column (E) in a spreadsheet. I need to run it successivley for a series of columns. The row references do not change but the column references increment through F,G,H etc.

Can you show me how to program this? Thanks in advance.

Sub DAL()
'
' DAL Macro
' Macro recorded 4/18/2011 by local.admin
'


SolverOk SetCell:="$E$25", MaxMinVal:=3, ValueOf:="0", ByChange:= _
"$E$10,$E$14,$E$28,$E$29,$E$41"
SolverAdd CellRef:="$E$37", Relation:=2, FormulaText:="0"
SolverOk SetCell:="$E$25", MaxMinVal:=3, ValueOf:="0", ByChange:= _
"$E$10,$E$14,$E$28,$E$29,$E$41"
SolverAdd CellRef:="$E$38", Relation:=2, FormulaText:="0"
SolverOk SetCell:="$E$25", MaxMinVal:=3, ValueOf:="0", ByChange:= _
"$E$10,$E$14,$E$28,$E$29,$E$41"
SolverAdd CellRef:="$E$47", Relation:=2, FormulaText:="0"
SolverOk SetCell:="$E$48", MaxMinVal:=3, ValueOf:="0", ByChange:= _
"$E$10,$E$14,$E$28,$E$29,$E$41"
SolverAdd CellRef:="$E$48", Relation:=2, FormulaText:="0"
SolverOk SetCell:="$E$48", MaxMinVal:=3, ValueOf:="0", ByChange:= _
"$E$10,$E$14,$E$28,$E$29,$E$41"
SolverSolve

End Sub


 
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
Having Solver Call a macro for each iteration Andrew Harris Excel Discussion (Misc queries) 2 March 8th 10 04:27 AM
I want to use the solver in a macro. Can this be done? drjmb924 Excel Programming 1 November 5th 09 04:47 AM
How do I use Excel Solver (for an Iteration in a row) for several no.of times? Deepak[_2_] Excel Discussion (Misc queries) 0 December 9th 08 06:35 AM
Running a Macro at every Solver Iteration sk[_4_] Excel Programming 4 January 26th 07 12:46 AM
solver in macro sisco98 Excel Programming 5 June 2nd 05 01:27 PM


All times are GMT +1. The time now is 08:09 AM.

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

About Us

"It's about Microsoft Excel"