Spreadsheet: 88638d1288425011-selecting-numbers-based-on-complex-criteria-751202-selecting-numbers-based-on-complex-criteria
Sheet: Criteria

 | A | B | C1 | C2 |  | A | B | C1 | C2 |  | A | B | C1 | C2 |  |  |  |  |  | Check that the 2 sets of numbers are valid numbers
 | 0 | 0 | 0 | 0 |  | 1 | 0 | 0 | 0 |  | 2 | 0 | 1 | 0 |  |  |  |  |  | Choose the formula below based on the contents of cell A
 | 0 | 1 | 0 | 0 |  | 1 | 1 | 0 | 0 |  | 2 | 1 | 1 | 0 |  |  |  |  |  | A=0 | if a=0, we have already eliminated other cases in the first IF so it C is always 0
 | 0 | 2 | 0 | 2 |  | 1 | 2 | 0 | 2 |  | 2 | 2 | 1 | 2 |  |  |  |  |  | A=1 | if a = 1  ditto
 | 0 | 3 | 0 | 2 |  | 1 | 3 | 0 | 2 |  | 2 | 3 | 1 | 2 |  |  |  |  |  | A=2 | If a= 2  same, but its always 1
 | 0 | 4 | #N/A | #N/A |  | 1 | 4 | #N/A | #N/A |  | 2 | 4 | #N/A | #N/A |  |  |  |  |  | A=3 | if b=0,1,2 then 2 if c=3,then 3, if c=8 then #N/A
 | 0 | 5 | #N/A | #N/A |  | 1 | 5 | #N/A | #N/A |  | 2 | 5 | #N/A | #N/A |  |  |  |  |  | A=4 | if b=0,1,2 then 3 if c=3,then 4 if c=8 then #N/A
 | 0 | 6 | #N/A | #N/A |  | 1 | 6 | #N/A | #N/A |  | 2 | 6 | #N/A | #N/A |  |  |  |  |  | A=5 | Cant have 5
 | 0 | 7 | #N/A | #N/A |  | 1 | 7 | #N/A | #N/A |  | 2 | 7 | #N/A | #N/A |  |  |  |  |  | A=6 | Cant have 6
 | 0 | 8 | 0 | 0 |  | 1 | 8 | 0 | 0 |  | 2 | 8 | 1 | 0 |  |  |  |  |  | A=7 | always 0
 |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | A=8 | always 0
 | A | B | C1 | C2 |  | A | B | C1 | C2 |  | A | B | C1 | C2 |  |  |  |  |  | If the first IF is false then display #N/A
 | 3 | 0 | 2 | 2 |  | 4 | 0 | 3 | 2 |  | 5 | 0 | #N/A | #N/A
 | 3 | 1 | 2 | 2 |  | 4 | 1 | 3 | 2 |  | 5 | 1 | #N/A | #N/A |  |  |  |  |  | Check that the 2 sets of numbers are valid numbers
 | 3 | 2 | 2 | 3 |  | 4 | 2 | 3 | 4 |  | 5 | 2 | #N/A | #N/A |  |  |  |  |  | Choose the formula below based on the contents of cell A
 | 3 | 3 | 3 | 3 |  | 4 | 3 | 4 | 4 |  | 5 | 3 | #N/A | #N/A |  |  |  |  |  | A=0
 | 3 | 4 | #N/A | #N/A |  | 4 | 4 | #N/A | #N/A |  | 5 | 4 | #N/A | #N/A |  |  |  |  |  | A=1
 | 3 | 5 | #N/A | #N/A |  | 4 | 5 | #N/A | #N/A |  | 5 | 5 | #N/A | #N/A |  |  |  |  |  | A=2
 | 3 | 6 | #N/A | #N/A |  | 4 | 6 | #N/A | #N/A |  | 5 | 6 | #N/A | #N/A |  |  |  |  |  | A=3
 | 3 | 7 | #N/A | #N/A |  | 4 | 7 | #N/A | #N/A |  | 5 | 7 | #N/A | #N/A |  |  |  |  |  | A=4
 | 3 | 8 | #N/A | #N/A |  | 4 | 8 | #N/A | #N/A |  | 5 | 8 | #N/A | #N/A |  |  |  |  |  | A=5
 |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | A=6
 | A | B | C1 | C2 |  | A | B | C1 | C2 |  | A | B | C1 | C2 |  |  |  |  |  | A=7
 | 6 | 0 | #N/A | #N/A |  | 7 | 0 | 0 | 0 |  | 8 | 0 | 0 | 0 |  |  |  |  |  | A=8
 | 6 | 1 | #N/A | #N/A |  | 7 | 1 | 0 | 0 |  | 8 | 1 | 0 | 0 |  |  |  |  |  | If the first IF is false then display #N/A
 | 6 | 2 | #N/A | #N/A |  | 7 | 2 | 0 | 2 |  | 8 | 2 | 0 | 2
 | 6 | 3 | #N/A | #N/A |  | 7 | 3 | 0 | 2 |  | 8 | 3 | 0 | 2
 | 6 | 4 | #N/A | #N/A |  | 7 | 4 | #N/A | #N/A |  | 8 | 4 | #N/A | #N/A
 | 6 | 5 | #N/A | #N/A |  | 7 | 5 | #N/A | #N/A |  | 8 | 5 | #N/A | #N/A
 | 6 | 6 | #N/A | #N/A |  | 7 | 6 | #N/A | #N/A |  | 8 | 6 | #N/A | #N/A
 | 6 | 7 | #N/A | #N/A |  | 7 | 7 | #N/A | #N/A |  | 8 | 7 | #N/A | #N/A
 | 6 | 8 | #N/A | #N/A |  | 7 | 8 | 0 | 0 |  | 8 | 8 | 0 | 0