Hi everyone,
I'm trying to figure out some wierd LOOKUP behavior with booleans. I
need to create a lookup function which looks for a TRUE in a range and
picks the value from the same row different column.
It would look like this:

1 FALSE
2 TRUE
3 FALSE
4 FALSE
5 FALSE
6 FALSE

The desired return value would be "2" in this case.

I just learned that the values in the lookup vector must be arranged in
ascending order, and these booleans are not arranged that way (if TRUE
= 1 and FALSE = 0).

After playing around with LOOKUP, I noticed some funny results with
other combinations of values in the lookup vector. LOOKUP looksup the
first true in rows 3-6, otherwise it returns the last false in rows
3-6. If rows 3-6 have neither TRUE nor FALSE, then it returns the
first TRUE in rows 1-2, otherwise it returns the last false in rows
1-2. This doesn't make much sense to me, so I'm totally at a loss
concerning how to overcome it.

Does anyone have any idea what's going on here? Does anyone have a
better idea for accomplishing this same task? Thank you for your help.

Andy Landen
SLC, UT