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

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
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,904
Messages
6,175,295
Members
452,633
Latest member
DougMo

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