Vlookup with left - all formatted as text - getting N/A - what am I missing

hi Folks
Am attaching a file with a vlookup (with a left function). The left function works fine (cell E2) but it is not working with the Vlookup. I have formatted both columns as text...so what am I missing? Thanks.
vlookup_with_left.xlsx
LVL 1
agwalshAsked:
Who is Participating?
 
Rgonzo1971Commented:
or
=VLOOKUP(--(LEFT(A2,3)),$H$2:$I$26,2,0)
0
 
NorieVBA ExpertCommented:
Try this.

=VLOOKUP(VALUE(LEFT(A2,3)),$H$2:$I$26,2,FALSE)
0
 
contactkarthiCommented:
Left gives back you a string you need to use value function to convert it to a number. That will fix the issue.
0
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

 
agwalshAuthor Commented:
Thanks for all that..but why won't converting both sets of data to text work?  Surely left is a text function - the data in A2:A26 is text. The data in H2:H26 is text....
@Rgonzo1971 - what does the -- in front of the Left do?
0
 
Rgonzo1971Commented:
Even if it's formatted as text, Excel uses it as a number
only if the number would be preceded by a apostrophe
'857
would Excel treat it as text

-- does the same work as value convert text to number
0
 
agwalshAuthor Commented:
Good to know that preceding a left() function with -- gets over the text issue with vlookups..
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.