Thread: Can it be done
View Single Post
  #2   Report Post  
Harlan Grove
 
Posts: n/a
Default

"Luke Dallman" wrote...
I need to evaluate the contents of three cells and return one of 8
choices in a fourth cell. The contents of the cells to be evaluated are
numbers and are compared to a given number as either "<" or "=".
The choices to return are 1a thru 1d or 2a thru 2d.

R HR % D
5 8 8 1a etc.

I have nested IF and AND functions, but can't figure out how to get past
the 7 nested functions limitation.
The formula works for 7 of the sets of conditions, but not the 8th.

The criteria a
1a - high R, high HR, high %
1b - high R, high HR, low %
1c - high R, low HR, high %
1d - high R, low HR, low %
2a - low R, high HR, high %
2b - low R, high HR, low %
2c - low R, low HR, high %
2d - low R, low HR, low %


Divide & conquer. High/Low R completely determines 1 or 2 and is independent
of a/b/c/d. That just leaves 4 letters.

=IF(R=R_Threshold,1,2)&IF(HR=HR_Threshold,
IF(Pct=Pct_Threshold),"a","b"),IF(Pct=Pct_Thresh old),"c","d"))

If this were more complicated, you could use LOOKUP.

=LOOKUP((R=R_Threshold)+2*(HR=HR_Threshold)+4*(P ct=Pct_Threshold),
{0;1;2;3;4;5;6;7},{"1a";"1b";"1c";"1d";"2a";"2b";" 2c";"2d"})