Hi everyone,
I need immediate help in solving the below. Thanks in Advance
I want the solver to set its "by changing variable" (lets say column J) and constraint range depending on the number of rows of another column, lets say B (which is not a by changing variable). The generated solutions of "by changing variable" (column J) should be All different and integer, and should have a higher bound (same as the number of rows of B ). The number of rows in column B changes regularly because it is referenced to another function. The solver range should dynamically change according to B.
I don't have much experience in VBA but I tried coding in two methods and both of them show the same error.
But it generates an error saying -" Perhaps some cells that are not variable cells are marked as integer, binary or all different"
Column J is the "by changing variable". Rows in B column should define the dynamic range of column J. T9 is B rows count value.
Method 1
Method 2
Bookmarks