premium solver for excel

rad_melb

New Member
Joined
Aug 5, 2007
Messages
31
Has anybody used premium solver for Excel (I am using V7.1 by frontline systems)? If you have, you will be familiar with the input box called 'by changing variable cells'

My question:
Is it possible to run a macro each time one of the 'by changing variable cells' changes in value. The macro ultimately affect the 'Set cell' (e.g. the cell you are trying to maximize) and hence it is essential that I have the macro in there.

Thanks..
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.

Jon Peltier

MrExcel MVP
Joined
May 14, 2003
Messages
5,271
Office Version
  1. 365
Platform
  1. Windows
  2. MacOS
Use a Worksheet_Change event procedure to detect the change to the cells, and from this procedure call the code that runs Solver.
 
Upvote 0

rad_melb

New Member
Joined
Aug 5, 2007
Messages
31
thanks jon. I have never used a worksheet change event procedure .. but I will look into it.

My macro takes a few minutes to run. Since I am using solver along with the macro and the change event procedure I'm guesing it will take a very long time to solve?
 
Upvote 0

Jon Peltier

MrExcel MVP
Joined
May 14, 2003
Messages
5,271
Office Version
  1. 365
Platform
  1. Windows
  2. MacOS
How are these cells changing value? If it's a user changing tham, Worksheet_Change will do it. If they change because a formula updates, then Worksheet_Calculate does it. Of course, if these are cells that Solver changes, they won't hold formulas.

You will want to make sure the macro doesn't fire continuously as the cells are updated, so put this before

Application.EnableEvents = False

and this after the body of your solver procedure

Application.EnableEvents = True
 
Upvote 0

Forum statistics

Threads
1,191,688
Messages
5,988,080
Members
440,125
Latest member
vincentchu2369

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top