So, for example:

A B

5 1.2

2 1.4

3 1.4

7 1.2

5 2.3

4 1.6

3 1.5

5 2.2

6 1.1

7 1.9

5 0.9

4 1.9

5 1.7

And if the variable to match is 5, then the figures to find the median of are 1.2, 2.3, 2.2, 0.9 and 1.7, of which of course the median is 1.7.

Any ideas?