# 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.  Register To Reply

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?  Register To Reply

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  Register To Reply