Hi Ankur, haven't heard from you in a while. Here's another non-array alternative:
=AGGREGATE(15,6,$I$2:$I$5000/($I$2:$I$5000>D2)/($H$2:$H$5000=A2),1)
The AGGREGATE() function can mimic other functions - SMALL() in this case - and ignore errors within the input array! So I divided each possible value by each test clause, returning 1 (TRUE) or 0 (FALSE) as divisors. VALUE/1 = VALUE , while VALUE/0 causes a #DIV/0! error, which is duly ignored by the function. Once all rows are processed, it returns the smallest "surviving" number.
Bookmarks