Try including the match function in the first part. Look here:

http://www.techonthenet.com/excel/formulas/match.php

Alan