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

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.

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.

4. ## Re: Excel Solver Constraint Question

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

5. ## Re: Excel Solver Constraint Question

@martindwilson

That worked! Thank you so much!

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.

##### Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1