the formula in column F below
=IFERROR(IF(AND(E2>=$B$3,E2<=$C$9),INDEX($D$3:$D$9, SUMPRODUCT(--(E2<=$C$3:$C$9), --(E2>=$B$3:$B$9), ROW($A$1:$A$7))),"out of range"),"err")
Ideally for value 21 in column E the correct answer should be "err" which appears in row2 and row 10 but not in row 5? I am not able to resolve why?
Same is the case with value 109 in row 7 and row 15
but not in row
A B C D E F
Row2 21 err
Row3 10 20 A 11 A
Row4 30 40 B 141 out of range
Row5 50 60 C 21 C
Row6 70 80 D 39.6 B
Row7 90 100 E 109 E
Row8 110 120 F 51 C
Row9 130 140 G 77 D
Row10 21 err
Row11 131 G
Row12 55 C
Row13 11 A
Row14 0 out of range
Row15 109 err
Thanks in avance.
Vrajesh
=IFERROR(IF(AND(E2>=$B$3,E2<=$C$9),INDEX($D$3:$D$9, SUMPRODUCT(--(E2<=$C$3:$C$9), --(E2>=$B$3:$B$9), ROW($A$1:$A$7))),"out of range"),"err")
Ideally for value 21 in column E the correct answer should be "err" which appears in row2 and row 10 but not in row 5? I am not able to resolve why?
Same is the case with value 109 in row 7 and row 15
but not in row
A B C D E F
Row2 21 err
Row3 10 20 A 11 A
Row4 30 40 B 141 out of range
Row5 50 60 C 21 C
Row6 70 80 D 39.6 B
Row7 90 100 E 109 E
Row8 110 120 F 51 C
Row9 130 140 G 77 D
Row10 21 err
Row11 131 G
Row12 55 C
Row13 11 A
Row14 0 out of range
Row15 109 err
Thanks in avance.
Vrajesh