Jump to content


Forcing Solver to return whole numbers


  • Please log in to reply
1 reply to this topic

#1 arthurjohnso



  • Members
  • Pip
  • 1 posts

Posted 04 January 2014 - 11:11 PM


I viewed the add on Solver.  It works very well but one issue I would like to resolve.  I work with budgets including perceentages of salaries, supplies, etc.  When I use solver it works great except it gives me whole numbers plus a fraction. I have to order in whole numbers.  How can I change the parameters to whole numbers?  Thanks

#2 Jonathan


    Forums Administrator

  • Administrators
  • 886 posts

Posted 05 January 2014 - 12:24 PM

Hi Arthur,


You can force Solver to use integers by adding an int constraint.


Using Solver and adding constraints is covered in Expert Skills Lesson 7-6: Use Solver.


Simply apply a constraint to the 'changing' cells (ie. the cells that Solver is going to change) with settings similar to the following:




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


I can provide a more specific answer if you'd like to attach a copy of your spreadsheet or a screenshot of your Solver settings.

Jonathan is part of the professional team who answer Excel-related questions posted on the ExcelCentral.com forums.
Jonathan also tests our courses prior to publication and has worked on all of our ten world bestselling Excel books for Excel 2007, Excel 2010, Excel 2013, Excel 2016 for Windows and Excel 2016 for Apple Mac. Jonathan has also worked on over 850 video lessons for or video courses covering Excel 2007, Excel 2010 and Excel 2013.
As well as extensive Excel knowledge, Jonathan has worked in the IT world for over thirteen years as a programmer, database designer and analyst for some of the world's largest companies.

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users