Restricting Values of Changing Cells in Solver

gwstat001

New Member
Joined
Sep 25, 2011
Messages
16
Hi

I have 50 share returns for 2009 (A2:A51). I am solving for optimal portfolio by allocating weights to my 50 shares in 2009. in solver, i am changing cells B2:B51, but the criteria is that if any of the 2009 returns is greater than 75 then the weight on that share should be 0. i tried to write an if function in column C of the changing cells but solver overrides the command when i solve. any suggestions?
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
Welcome to the Board!

I don't use Solver much at all, but I think you'd need to set exterior limitations like that programmatically (VBA).

You might want to post a shot of your sheet, which will help someone get you on the right track (see my sig for how to do it).
 
Upvote 0
If certain shares should be excluded because of a priori data, then they should be excluded a priori, i.e., they shouldn't be among the changing cells.
 
Upvote 0
If certain shares should be excluded because of a priori data, then they should be excluded a priori, i.e., they shouldn't be among the changing cells.


Only problem is I am running a loop that optimizes for 5 years, from 2005 to 2009. So i'm finding 5 optimal portfolios, so i cant exlude entire rows across the years.
 
Upvote 0
I am solving for optimal portfolio by allocating weights to my 50 shares in 2009... but the criteria is that if any of the 2009 returns is greater than 75 ...
Only problem is I am running a loop that optimizes for 5 years, from 2005 to 2009.
I can't reconcile those two statements.

You can't assign weights in 2005 because of results in 2009?
 
Upvote 0

Forum statistics

Threads
1,224,605
Messages
6,179,860
Members
452,948
Latest member
UsmanAli786

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