Solved

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

Posted on 2016-10-28
6
27 Views
Last Modified: 2016-10-28
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
0
Comment
Question by:agwalsh
6 Comments
 
LVL 33

Assisted Solution

by:Norie
Norie earned 125 total points
ID: 41863523
Try this.

=VLOOKUP(VALUE(LEFT(A2,3)),$H$2:$I$26,2,FALSE)
0
 
LVL 17

Assisted Solution

by:contactkarthi
contactkarthi earned 125 total points
ID: 41863609
Left gives back you a string you need to use value function to convert it to a number. That will fix the issue.
0
 
LVL 49

Accepted Solution

by:
Rgonzo1971 earned 250 total points
ID: 41863612
or
=VLOOKUP(--(LEFT(A2,3)),$H$2:$I$26,2,0)
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Author Comment

by:agwalsh
ID: 41863624
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
 
LVL 49

Expert Comment

by:Rgonzo1971
ID: 41863636
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
 

Author Closing Comment

by:agwalsh
ID: 41863685
Good to know that preceding a left() function with -- gets over the text issue with vlookups..
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Drop Down List with Unique/Distinct Values (Part II - ComboBox or ListBox and Data Validation List Bonus!) David Miller (dlmille) Intro This article focuses on delivering unique, sorted lists to list objects (e.g., ComboBox, ListBox) and Dat…
Introduction This Article briefly covers methods of calculating the NPV and IRR variants in Excel as well as the limitations in calculating and interpreting IRR results. Paraphrasing Richard Shockley, author of my favourite finance reference tex…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

912 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now