Code:

```
Function Modulus(a, b) As Integer 'for x,y positive
Do While a > b
a = a - b
Loop
Modulus = a
End Function
```

it seems to work, but when I call it with this stmt

Code:

```
If Ceiling(i / 3) = Ceiling(x / 3) And Ceiling(j / 3) = Ceiling(y / 3) Then
If Cells(x, y) <> 0 Then
Possible((Modulus(x, 3) - 1) * 3+ Modulus(y, 3)) = 0
End If
End If
```

with x=1,y=3; the y somehow becomes 0 when I try to set that member of possible to 0. I am stumped. any suggestions?