Best way to ilustrate your problem is to upload some .xls example with desired inputs in outputs.

With generally asked question we can't do more than give general answer. Sorry

So best way would be to look somewhere how use VLOOKUP.. For example here:

http://www.youtube.com/watch?v=GZX2iXfqALs

It's just few minutes so try follow instructions and if you can't make it work please upload example workbook.