Forcing Solver to return whole numbers

What is Solver?

Solver is an Excel Add-In that automatically ‘solves’ mathematical problems. You could use it, for example, to calculate which products would make the best use of the materials you have on hand.

While Solver is an Add-In it is included with every copy of Excel and can be enabled very easily. There is also a simpler calculation tool called Goal Seek that can be found on Excel’s Data Ribbon tab.

Goal Seek and Solver are both explained in depth in our Expert Skills Books and E-books.

Adding a constraint for whole numbers

Solver supports ‘constraints’, which supply rules that Solver must follow when calculating its results. To limit Solver to whole numbers you would need to create an Integer (or int) constraint:

This will force Solver to use only whole numbers in the specified cells.

Leave a Comment

Your email address will not be published.