........
I used this formula
{=IFERROR(INDEX($A$2:$A$17, MATCH(0, COUNTIF(C$1:$C1, $A$2:$A$17), 0),1),"")}
here:
http://www.mrexcel.com/forum/excel-questions/818208-code-move-vertical-horizontal-4.html?
. _ I can't remember where I got it from, but I did 'ava a go at explaining it... clourfully!
Regards
Mustava Klatsche!