Hi all
Having a problem with a vlookup involving part of the cells value..
e.g. on my Names sheet I have info like
89743 Name 1
987232 Name 2
On another sheet I want the lookup
In this example A11 = 89743
THIS WORKS FINE
=IF(ISNA(VLOOKUP(A11,n_EmpList,1,0)),0,OFFSET(Names!$B$1,MATCH(A11,INDEX(n_EmpList,,1),0),-1))
The reason I have to use the offset is just because of the way the data is imported, but that bit is fine.
The problem is that the value in A11 = 189743 However I still want it to look up the value on the names sheet 89743.
I thought this formula would work by just using the right() function.
=IF(ISNA(VLOOKUP(RIGHT(A11,6),n_EmpList,1,0)),0,OFFSET(Names!$B$1,MATCH(RIGHT(A11,6),INDEX(n_EmpList,,1),0),-1))
I presume this is because it is a number as it works fine if I test it with text.
Any ideas???
Bookmarks