Sounds like you need recursion! Basically you need a function (or
subroutine) which will loop through each of the possible values for a
given cell, but each time it changes the value in that cell, it calls
itself for the next cell. Within that function, you need some way to
test for completion, i.e. when it gets to the last cell. The code
below will run your combinations in the cells of row 1:
Const MIN = -10
Const MAX = 10
Sub RunCombinations()
RunCellValues 5, 1 ' change first value to your liking
End Sub
Sub RunCellValues(ByVal iCount As Integer, ByVal iIndex As Integer)
Dim ivalue As Integer
If iIndex <= iCount Then
For ivalue = MIN To MAX
Cells(1, iIndex).Value = ivalue
RunCellValues iCount, iIndex + 1
Next ivalue
End If
End Sub