# Solver variable constraint to limit % variable to whole percent.

1. ## Solver variable constraint to limit % variable to whole percent.

How do I apply a constraint to limit a percent variable to solve to a whole percent, like 16% not 16.46%.
I am using Excel 2019
Thank you.

2. ## Re: Solver variable constraint to limit % variable to whole percent.

the 16% is added manually or a part of a calculation?
what is the calculation?

3. ## Re: Solver variable constraint to limit % variable to whole percent.

Originally Posted by Jiggers
How do I apply a constraint to limit a percent variable to solve to a whole percent, like 16% not 16.46%.
Without a clear example (see the yellow banner above), here is a general advice.

You can define a variable of type int (integer) in the Solver mask, and then use in your calculations the value int/100.

In order to help Solver finding a solution, the variable should be as much constrained as possible. For instance, set it to be greater than 5 and smaller than 20, depending on the problem/model you are facing.

HTH,

Francesco

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