How to Use Solver in Google Sheets
Excel's Solver finds the inputs that maximize, minimize or hit a target value for a formula, subject to constraints. Google Sheets doesn't include one. SheetStats adds a Solver that works the same way as Excel's Simplex LP method.
Install SheetStats free Free Google Sheets™ add-on by Tiny Lever
Example: product mix
Variable cells B2:B3 are units of two products. Profit in B5 is =20*B2+30*B3. Labor in B6 is =B2+2*B3 (max 40) and machine time in B7 is =3*B2+B3 (max 45).
- Go to Extensions → SheetStats → Solver.
- Objective: B5, Max.
- Variable cells: B2:B3.
- Constraints: B6 <= 40, B7 <= 45. Add int if you need whole units.
- Click Solve. Solver writes the best values into B2:B3 (here 10 and 15, profit 650) and can add an Answer Report sheet.
Free to install. Data Analysis, Goal Seek, Solver and Monte Carlo in one add-on.
Questions
Does it handle nonlinear models?
It solves linear and integer models (Excel's Simplex LP). If a formula multiplies or divides variable cells, Solver tells you the model is not linear.
Can I use integer or binary variables?
Yes: add a constraint with "int" or "bin" on the variable cells.
How many variables?
The free version handles up to 6 variable cells; Pro is unlimited.