Excel Solver Constraint Question

1. Excel Solver Constraint Question

I am trying to enter a constraint where "x OR y >= 1"

Am I just missing something obvious here? Basically I need, for example, cell A1 OR cell A2 to be greater than 1.

Any ideas? Thanks for the help!  Register To Reply

2. Re: Excel Solver Constraint Question

A few ideas/thoughts:

1) Sometimes it is important to carefully define your constraint. For example, is this an "exclusive OR" type logic (either x or y >=1 but not both) or is it a simple OR logic (x or y or both >=1)? Are x and y real values or are they going to be integers only?
2) When there isn't a way to enter the "combined" logic statement directly into a Solver constraint, then try to create a function in a worksheet cell that can represent the logic you want to constrain. For example, if, stated differently, your logic here means that one of those values will be 0, then you can have a cell with the function =PRODUCT(x,y), then, in Solver, constrain that cell to be 0.  Register To Reply

3. Re: Excel Solver Constraint Question

Thanks for the reply. I am trying to say that "x or y or both >=1". X and y are real values.  Register To Reply

4. Re: Excel Solver Constraint Question

you could put in say c1
=--OR(A1>=1,A2>=1)
then have a criteria of c1=1  Register To Reply

5. Re: Excel Solver Constraint Question

@martindwilson

That worked! Thank you so much!  Register To Reply

6. Re: Excel Solver Constraint Question

@ Verna

Thanks.

Also, as an infrequent user of the forum, you may have forgotten (or may not be aware) that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.  Register To Reply