minimize or maximize non-linear problem in vba

Houssame

New Member
Joined
Aug 14, 2021
Messages
3
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
Dear Excel fam.,
I am trying to use the powerful solver tool in excel, to minimize a non linear function f(x,y,z) observing certain constraints say x-xy=A.
My question is : is there any way, I can loop through different values of A using vba and solver so as I generate two columns, one of the optimized function and the other of A. I don't know actually how to use solver (non-linear or even LP) through vba editor. Can anyone please help me ?
Thanking you in advance,
Best regards,
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
Are you able to set your problem up using the Solver interface in Excel? If so, then do that while recording the setup as a macro. You will then be able to look at the vba generated for Solver. If you then examine the vba code generated for Solver you should be able to figure out how to modify it to loop through different values.
Does that make sense?
 
Upvote 0

Forum statistics

Threads
1,223,236
Messages
6,170,912
Members
452,366
Latest member
TePunaBloke

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
Back
Top