P
Peter Bernadyne
Hello,
I was just wondering whether it was possible to use the Solver add-in
but by referencing data in arrays in VBA code rather than cells in a
worksheet?
Obviously, I know the latter is possible but I'm interested in saving
time by defining my design functions, variables, etc. and related data
in array form in memory rather than having to physically write
everything to a worksheet.
If possible, would anyone know how to reference specific elements in
these arrays for Solver?
For example rather than doing this in a worksheet:
SolverAdd CellRef:="$A$8:$C$8", Relation:=3, FormulaText:="$C$9:$E$9"
I'd rather go for something like:
SolverAdd Ref:=myarray(first row, etc), Relation:=3,
FormulaText:="4xy"
[Yes, this line is littered with non-VBA BS, but you get the idea]
Thanks,
-Pete
I was just wondering whether it was possible to use the Solver add-in
but by referencing data in arrays in VBA code rather than cells in a
worksheet?
Obviously, I know the latter is possible but I'm interested in saving
time by defining my design functions, variables, etc. and related data
in array form in memory rather than having to physically write
everything to a worksheet.
If possible, would anyone know how to reference specific elements in
these arrays for Solver?
For example rather than doing this in a worksheet:
SolverAdd CellRef:="$A$8:$C$8", Relation:=3, FormulaText:="$C$9:$E$9"
I'd rather go for something like:
SolverAdd Ref:=myarray(first row, etc), Relation:=3,
FormulaText:="4xy"
[Yes, this line is littered with non-VBA BS, but you get the idea]
Thanks,
-Pete