# Help with constraints in solver

#### largeselection

##### Active Member
Hello again,

this time I have a question regarding excel's "solver" add-in.

Basically I want to hit a certain number which is the sum of some numbers times some other numbers.

Here's the example:
<X>
A) 1 * (BLANK)
B) 14 * (BLANK)
C) 77 * (BLANK)

I'm using solver to fill in the (BLANK)s.
<X> = sum (A,B,C) and I want the value of X to be say 1000

However there are constraints. All the (BLANK)s need to be multiple of 12s. In addition, they need to be positive integers only. Also, they need to go in descending order so (BLANK) A must be > (BLANK) B must be > (BLANK) C.

I would like to get all the way to C, but if I can only get to B that is ok. (The real example extends to J so I'm saying that the chain can have zeros for H, I, J, as an example, but ideally would go out as far as possible).

Also, I need <X> the value of X to be near 1000, not exactly 1000. How is the best way to accomplish this either via solver or other?

### Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.

Replies
10
Views
416
Replies
0
Views
66
Replies
1
Views
822
Replies
0
Views
700
Replies
4
Views
155

1,181,618
Messages
5,930,972
Members
436,767
Latest member
Langaws

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