Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 04-25-2013, 04:28 PM
ue418 ue418 is offline Simple Macro help for Excel Solver Windows 7 32bit Simple Macro help for Excel Solver Office 2000
Novice
Simple Macro help for Excel Solver
 
Join Date: May 2012
Posts: 17
ue418 is on a distinguished road
Default Simple Macro help for Excel Solver

I have a simple macro that performs a Solver routine. For one of my variables (cell AF61), I have two constraints:



SolverAdd CellRef:="$AF$61", Relation:=1, FormulaText:="$ak$75"
SolverAdd CellRef:="$AF$61", Relation:=3, FormulaText:="$aj$75"

So this just ensures that AF61 stays between those two limits.

However, I want to specify the value of AF61 right before the solversolve command. I have it in my mind that the "starting value" is important? What I did was just add the following line:

AF61 = (AK75 + AJ75)/2

My goal is to make the "starting value" of AF 61 halfway between AK75 and AJ75 (the limits). That line doesn't fail, but I have no idea if it is the right way to specify a cell value in VBA! There are no Dim statements in the solver macro, so I assume the dimensioning has already been taken care of internally. Is there a way to specify the value of cell AF61 in the macro like this? Thanks a lot for any help.
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Simple Macro help for Excel Solver Simple graph in excel izzy786 Excel 1 09-08-2012 08:04 AM
Should be a simple macro, need a start Jamtart PowerPoint 7 08-13-2012 06:11 AM
Simple Macro help for Excel Solver Another simple macro problem Ulodesk Word VBA 1 06-08-2012 06:24 PM
Simple VBA macro error Formulayeti PowerPoint 1 12-09-2011 10:02 PM
Simple macro undoable? garon5 Outlook 0 04-20-2007 10:27 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 06:32 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft