+ Reply to Thread
Results 1 to 3 of 3

Why is my Vlookup formula not working?

  1. #1
    Registered User
    Join Date
    03-05-2009
    Location
    Surrey, UK
    MS-Off Ver
    Excel 2007
    Posts
    9

    Why is my Vlookup formula not working?

    Right, here is my formula

    =VLOOKUP(Y2,A:B,1,FALSE)

    A B X Y Z
    1 ID Name Name Code
    2 111 A #N/A E XXX
    3 222 B #N/A C UUU
    4 333 C #N/A D GGG
    5 444 D #N/A B BBB
    6 555 E #N/A A NNN


    I want to match the ID of column A, with the name located in columns B&Y - but each time I enter the formula above - it just returns 'N/A'.

    To my mind's eye - this formula looks right & I can't work out what is wrong!

    Any ideas?

    Thanks

    K
    Attached Files Attached Files
    Last edited by Kleinstein; 07-08-2010 at 07:41 AM.

  2. #2
    Administrator JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Why is my Vlookup formula not working?

    VLOOKUP() works by matching the value in the first column of your range, then returning a value to the right of that matched value. Since you're trying to match in column B and return a value from column A, you can't use VLOOKUP().

    Use this instead:

    =INDEX(A:A, MATCH(Y2, B:B, 0))
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    “None of us is as good as all of us” - Ray Kroc
    “Actually, I *am* a rocket scientist.” - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    03-05-2009
    Location
    Surrey, UK
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: Why is my Vlookup formula not working?

    Ideal! Thank you very much for your help JBeaucaire.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1