# Solver Looping with other calculator

#### hartjonathand

##### New Member
Hey guys,

I have a button on one of my worksheets for which the code is related a calculator that is necessary to recalculate returns every time you re-enter assumptions.

My question is, in order to use solver to solve the nonlinear optimization problem (I have to solve for two percentages based on 3-5 constraints) correctly, the returns need to be recalculated for each iteration with the VBA calculator otherwise the optimization problem isn't accurately solved. Is there a way to loop the other VBA based calculator into each iteration of solver given that one of the values required to solve for the optimal profit is based on values from the VBA calculator?

### Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)

Replies
0
Views
384
Replies
0
Views
263
Replies
1
Views
382
Replies
0
Views
602
Replies
2
Views
625

1,190,680
Messages
5,982,223
Members
439,769
Latest member
trungminh2802

### 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.

### Which adblocker are you using?

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

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