solveradd

  1. K

    Question on Solver

    I am trying to run the code below. When I run this, I am getting the following error message: OpenSolver Could not find an optimal solution, and reported: Infeasible The Model contains a restraint 'I2:I160 >=1' for which instance 4does not depend on the decision variable and is not satisfied...
  2. A

    solver encountered an error in the objective cell or a constraint cell

    Hello All- I'm hoping you can help me get to the bottom of a solver issue. I have a simple workbook that I created several years ago. After a few recent modifications, it no longer works. I get the "solver encountered an error in the objective cell or a constraint cell" error and cannot...
  3. K

    Help with Arrays

    Note: This was originally posted at https://www.excelforum.com/excel-programming-vba-macros/1274124-help-with-arrays.html I have not been able to get any responses to addressing this. My apologies if this doesn't make sense, I am new to using arrays and have been trying to research this but...
  4. K

    VBA - questions

    First, I have the code below. When I run this, a new spreadsheet is created as expected. When the data is placed on the new spreadsheet, it puts all of the selected values that I am trying to solve for (A2 to A134) instead of just the solver results, 6 of the values as determined by Solveradd...
  5. K

    VBA Questions - New to Macros

    Sorry for the long post, any help is appreciated. I am working on the Macro below. I am hoping someone can provide a little guidance on a few questions. 1. Should the Marco be in Module1, The spreadsheet I am running it against or in ThisWorkbook? 2. I can run the solver without an issue...
  6. A

    How to use Solveradd for step parameter?

    I want to VBA Solver search parameter array like as 5, 8, 11, 14, 17...60 step 3, I use SolverAdd code as follow but not work?Why [W4] as parameter start 5 Range("step") = 3 SolverAdd CellRef:=[W4], Relation:=2, FormulaText:=2+Range("step")*Int([W4]/Range("step"))
  7. H

    Solver VBA loop giving bad results after a few loops

    Hi , I wrote a code to run solver , unfortunately after 10 loops the results are not optimal. This is the code : Sub Solver() Dim Pro As Range Dim Dem As Range Dim Tot_Pro As Range Dim Start_Row As Integer Dim End_Row As Integer Dim i As Integer Dim j As Integer Application.ScreenUpdating...
  8. M

    Solver macro

    Hi, I am reviewing a macro. There is logic that appears to use the solver, but I wasn't sure. SolverReset SolverOk SetCell:="$E$7", MaxMinVal:=3, ValueOf:="0", ByChange:="$D$16" SolverOptions AssumeNonNeg:=False SolverAdd CellRef:="$D$16", Relation:=1, FormulaText:="0.05"...
  9. M

    VBA Solver FormulaText

    Is there any way to call a variable from VBA as the input for FormulaText in SolverAdd? Sub () intX=5 SolverAdd CellRef:=Range("A1"),Relation:=1, FormulaText:=intX End Sub
  10. R

    Some Macros does not work when sheet is protected

    Hello all, I'm currently working on my thesis, i have about 2 weeks left before i have to hand it in. The problem lays within my macros. I have 5 macros in my sheet, when i protect the sheets, they stop working, all except 1 which is a simple print macro. I will post the macro text here, if you...
  11. G

    Checking Solver Add in Conditions using VBA

    Hi there, I need to check some conditions applied to a sheet using Solver Addin. I recorded the action when adding them : SolverOk SetCell:="$B$13", MaxMinVal:=1, ValueOf:=0, ByChange:="$B$11:$D$11", _ Engine:=1, EngineDesc:="GRG Nonlinear" SolverAdd CellRef:="$B$11"...
  12. R

    Excel VBA Macro Solver Doubt - Infinite Loop

    It seems like this is going to be simple, but I can't figure out the correct way to fix my infinite loop problem. I have a worksheet (Batch Sizing) which leverages Excel solver to find the right optimized batch size for planning. I'm worried about the placement of End statement as the routine...
  13. J

    Use solver in VBA with loop in rows

    favorite I am trying to use solver to find the root for 182 cells, each cell is depend only on one another variable, the output cell is from O2 to O183, the variable cell is from P2 to P183. I am trying to change the variable cells to have the output cell equal to 1. The code works but the...
  14. G

    SolverAdd not adding a criterion.

    The code below is part of a macro that programmatically sets criteria in Solver and runs Solver. The process has appeared to have worked perfectly for multiple machines and versions of Excel for about a year. I am using Excel 2003. However, I have come across an error that I cannot fathom. When...

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top