I have a table (looks like this but the numbers might move around)

Code:
    A        B       C       D       E       F
1|  6      100     120      140    100    100
2|  120    100     80       100    120     80
3|  80      120    140      140    180    100
4|  60      120    140      100    220    120
5|  100    120    100       220   120     200
How would go about making somthing in vb6 (or at all) to solve this.

To solve, you must find 6 groups, each group add up to exatly 600.
Each block in the group must tuch (on one side, so from top,buttom,left or right, no diagonals). the number of blocks in a groups may vary.

so example F1, F2, F3, F4, and F5 are a valid group all tuch on a side, and the sum of all of them is 600
same goes for B4, C3, C4, D4, and C5, and so on...