K
KLM
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
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