LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
KLM
 
Posts: n/a
Default Solver VBA routine

I am trying to create a macro that will run the Excel Solver on several rows
in a spreadsheet. The number of rows could change, therefore I need to
create a loop that will work until the row or cell in the A column is empty.
You will see that I inserted the word current for the row location, I'm not
sure if this is the correct syntax.

I"m new to VBA, so I appreciate any guidance that anyone has.

Thanks,
KLM


Sub ditchdepth()
'
' ditchdepth Macro
' Macro recorded 7/31/2005 by KMANNING
'
' Keyboard Shortcut: Ctrl+k
counter = 0
Do Until Selection.Offset(counter, 0).Value = "<"
'
SolverOk SetCell:="(current,18)", MaxMinVal:=3, ValueOf:="0",
ByChange:="(current,7)"
SolverSolve
counter = counter + 1
Loop
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
Using solver with function with multiple outputs [email protected] Excel Worksheet Functions 5 July 29th 05 01:58 PM
Solver and dynamic ranges tim Excel Worksheet Functions 0 May 5th 05 01:29 AM
Solver Problems Walker Excel Worksheet Functions 2 May 2nd 05 07:33 PM
Excel: Solver leo Excel Worksheet Functions 1 April 29th 05 02:02 AM
solver constraint jojo Excel Worksheet Functions 0 February 17th 05 10:11 PM


All times are GMT +1. The time now is 09:50 PM.

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"