Thanks Narayan.
You are right the problem is peculiar.
It appears only when the vlookup formula in F column is in the same row where the
lookup data is situated.
Say our lookup data is in row A3 to E9 and lookup is done in colum F from row 2 to row 100, then row no.1 and rows from 10 to...
The data is..
A B C D E F
Row2 Blank Blank Blnk 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 Blank Blank Blnk 21 err
Row11 Blank Blank Blnk 131 G
Row12 Blank Blank Blnk...
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...