Emma,
If it's the case that A2 has a bunch of CHAR(160), it is simpler to invoke:
Code:=LOOKUP(9.99999999999999E+307, SEARCH(" "&$D$2:$D$10&" "," "&SUBSTITUTE(A2,CHAR(160),"")&" "), $E$2:$E$10)
I meant this for Harry's formula:
=LOOKUP(9^6,FIND(D$2:D$10,A2),E$2:E$10)
which will work for all of the rows in 2007, and earlier versions. From a character count perspective, I do not think it's possible to improve this and still maintain the ability to copy the formula down.
Using named ranges [c =$D$2:$D$10 and n =$E$2:$E$10 x =9^6]
charactercount is reduced by
=LOOKUP(x,FIND(c,A2),n)
Function VLookLike(txt As Variant, rng As Range) As Variant
Dim myPtn As String
myPtn = "(" & Join(WorksheetFunction.Transpose(rng.Columns(1).Value),"|") & ")"
With CreateObject("VBScript.RegExp")
.Pattern = myPtn
If .test(txt.Value) Then myMatch = .execute(txt.Value)(0)
End With
VLookLike = rng.Columns(2).Cells(WorksheetFunction.Match(myMatch,rng.Columns(1),0)).Value
End Function