One of the more useful functions in Excel is the Trim function.
Trim does exactly what is sounds like, it trims white space from the front and end of text. This is crucial if you are using the text in a lookup.
lets say in cell A1 you have the following text " this has spaces in the front and back "
in cell B1 type =TRIM(A1)
the value is converted to "this has spaces in the front and back". The spaces in the front and back of the text are removed. Now you can use this value in a =VLOOKUP function.