Solver

comradarthur

New Member
Joined
May 27, 2008
Messages
4
Solver and Drop down menus problems

I'm trying to use Solver to Optimize a simulator I built in excel. The target cell is Market Share and the adjustable cells are drop down menu links. In other words, the drop down boxes change the price of a product and that affects the share. The issue I'm running into is solver goes through fractions even if I constrain it to be intergers and since the values can only be 1-7, I get errors for my values and solver stops working.

I tried including an iferror statement so errors wouldn't appear, but it doesn't seem to help.

I would really appreciate help on this issue. I'm hoping it doesn't involve vba code because I'm not too familiar with it.

thanks.
 
Last edited:

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
Re: Solver and Drop down menus problems

Welcome to the board.

In addition to setting an integer criterion, you'll want (need) to change the Tolerance to 0% within the solver options to ensure an integer value.
 
Upvote 0
Thanks so much for responding. I tried what you suggested and it didn't resolve the problem. the issue seems to be that excel still goes through other values and when it does it gets an error message because my formulas can't handle the fractions. I tried adding iserror formulas to prevent errors and its kind of working so far. I'll respond again if it works.
Thanks again.
 
Upvote 0
Nevermind, that doesn't work either, even when the tolerance is at 0, I still got a solution where ".999999999" was in one of the changed cells, which gave me an error.
 
Upvote 0
It's hard to know without seeing your model setup, but I'm guessing that you're seeing 0.999999 instead of 1 because of floating point arithmetic.

What are the formulas you're using that can't handle the fractions? Since floating point errors are a limitation of Excel, it will be better to adjust your formulas... something like =IF(ROUND(A1,2)=1, do_some_stuff, do_other_stuff) instead of =IF(A1=1, do_some_stuff, do_other_stuff)
 
Upvote 0
The target cell is just an average which creates a share, the changing cells are links to drop down boxes, which I use to Hlookup columns of data, so when excel inputs .999999 the hlookup doesn't work and the whole thing falls apart.
 
Upvote 0

Forum statistics

Threads
1,223,228
Messages
6,170,871
Members
452,363
Latest member
merico17

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