View Single Post
  #3   Report Post  
Harlan Grove
 
Posts: n/a
Default

roffler wrote...
My setup is this:
4 columns, with "yes" or "no" in each column, describing a set of
objects. I have a logic tree that my boss gave me, with 15 possible
integer outputs, corresponding to the yes/no paths each object might
take. (For example, a yes- yes-no- no path might give the number
10)

....

With 4 cells containing Y/N, there are 16 (2^4), not 15, possible
combinations.

If your entry cells were B2:E2, you could use something as simple as

=LOOKUP(SUMPRODUCT(--(B2:E2="Yes"),2^{3,2,1,0}),ROW(INDIRECT("1:16"))-1,
<YourBoss'sMappingHere)

SUMPRODUCT call returns values as follows.

B C D E SUMPRODUCT
N N N N 0
N N N Y 1
N N Y N 2
N N Y Y 3
N Y N N 4
N Y N Y 5
N Y Y N 6
N Y Y Y 7
Y N N N 8
Y N N Y 9
Y N Y N 10
Y N Y Y 11
Y Y N N 12
Y Y N Y 13
Y Y Y N 14
Y Y Y Y 15

Map these to your boss's desired results.