mardi 26 février 2019

Solver if cell = "Yes" then use that option

I am facing a problem when i want to add a constraint in solver. My issue is that i have an input sheet where i have the following:

Two-man shifts = Yes/no

Possible in real life = Yes/no

The value from those fields should be implemented in the solver so that if it says two-man shifts = no. Then solver shouldn't include those opportunities which has two-man shifts, i have tried many options and my final try was like this, but it didnt work: Sheet for solver

But it keeps using the two man shifts despite the value is = no i have used the following formula for the cells in D20-G20 (this will always be 1 since it is one-man shifts and should always be included)

=IF('Performance oversigt'!$C$19="yes";1;1)

In H20-K20 (the opportunities which is two-man shifts).

=IF('Performance'!$C$19="no";-1;1)

I changed the value to -1 because 0 didnt work but i wouldn't help.

I hope that some of you guys might be able to help me out on this one, i think the issue is caused by the signs, but i can't figure it out.

Aucun commentaire:

Enregistrer un commentaire