I'm trying to run all possible combinations in a variable range, but
cannot seem to get my code to work...
The range can be from 1 to 6 cells, each with the same minimum and
maximum values (such as -100 to 100).
Either of following will try the individual cells of range "R" from
-10 to 10, but not all possible combinations (ie; Given a selection
range of 2 cells, run -10 in the first cell, then -10 to 10 in the
second, then -9 and -10 to 10, etc).
Sub MyLoopEachAll(R)
For Each cell In R
For x = -10 To 10 'Min1.Value To Max1.Value
cell.Value = x
Next x
Next cell
End Sub
Sub MyLoopForAll(R)
For x = 1 To R.Count
For y = -10 To 10 'Min1.Value To Max1.Value
R(x).Value = y
Next y
Next x
End Sub
Hope I've made the problem clear...