Excel/vlookup

Advertisement


Question
QUESTION: Hi Tom

I have written a very simple vlookup formula but it won't pick up the information from the source.  I have tried various permutations but to no avail.  The formula is:=VLOOKUP(I3,$A$343:$B$348,2,FALSE)

Would you mind if I sent the workbook to you for your thoughts?  

Chris Mitchell

ANSWER: Christopher,

try doing this

=countif(A343:A348,I3)

did it at least return 1.

If it did, then are you searching for a number.  

the number 123 <> the string "123"  

countif is more forgiving in that respect so if it returned 1 and the vlookup still isn't working then you have to see how the data is stored (of course if they are both strings, then that isn't a consideration).

If countif failed and you visually think there is a match, then check the len of the fields that should match

=Len(I3)
=Len(A344)

if they are not the same length but look the same, then one could have a space at the beginning or end as an example.

So your vlookup looks correct.  It appears to be a data problem.   (I am sure you realize you are only looking at 6 rows - I assume that is scaled down to do a test.

Also note that the values you show are on the same sheet.  

If you can't figure it out, then I can take a look.

--
Regards,
Tom Ogilvy


---------- FOLLOW-UP ----------

QUESTION: Hi

=countif(a343:A348,i3) returns "0"

LEN(i3) returns "38" when i3 contains the text "Speech, Language or Communication Need"

LEN(A344) returns 3 when a344 contains the same text.

I am completely baffled.  I will send the workbook to you, if you don't mind.

Thanks in advance.

Chris Mitchell

Answer
Chris,

Cell A344 had a formula in it that was causing a circular reference error.  The first match function was using  Match(A344,...

A formula can't refer to itself.  I put in a hard coded value in A344 and things started working.

I will send back the file.

--
Regards,
Tom Ogilvy

About Excel
This topic answers questions related to Microsoft Excel spreadsheet (or workbook) stand-alone or Mircrosoft Office Excel including Excel 2003, Excel 2007, Office 2000, and Office XP. You can get Excel help on Excel formulas(or functions), Excell macros, charting in Excel, advanced features, and the general use of Excel. This does not provide a general Excel tutorial nor the basics of using a spreadsheet. It provides specific answers to using Microsoft Excel only. If you do not see your Excel question answered in this area then please ask an Excel question here

Excel

All Answers


Answers by Expert:


Ask Experts

Volunteer


Tom Ogilvy

Expertise

Selected as an Excel MVP by Microsoft since 1999. Answering Excel questions in Allexperts since its inception in 2001. Able to answer questions on almost all aspects of Excel's internal capabilities. If seeking a VBA solution, please specify that in your question itself so I give you the answer you want. [Excel has weak protection - if you are distributing an application, I don't answer questions on how to protect your project from your users.]

Experience

Extensive experience.

Education/Credentials
Master of Science (MS) degree Operations Research (ORSA)

Awards and Honors
Microsoft MVP in Excel.

©2016 About.com. All rights reserved.