+ Reply to Thread
Results 1 to 7 of 7

Vlookup behaving strangely

  1. #1
    Registered User
    Join Date
    04-19-2012
    Location
    East London, South Africa
    MS-Off Ver
    Office 2010
    Posts
    22

    Vlookup behaving strangely

    Hi

    I'm not sure if there is something I'm missing or if I don't know how to use VLOOKUP but it seems to be behaving really strangely. I have a database at work that is supposed to use supplier numbers to bring back a supplier name but it just gives #NA result. I've checked and re-checked the formula to no avail. I've tried formatting the data, copying and pasting to ensure that they are the same but nothing works. I created a dummy worksheets with two columns and 4 rows as per the attached. If I change the value (B2 on sheet 2) I'm looking up to the fruit, it will bring up the #NA value. If I change the value to look for to the shop then it brings it up, even if I change the reference column from 1 to 2 it will always bring a result for the shop and #NA for the fruit name. I'm totally confused, perhaps I'm missing something. I'm using excel 2013.
    Attached Files Attached Files

  2. #2
    Forum Expert tim201110's Avatar
    Join Date
    10-23-2011
    Location
    Russia
    MS-Off Ver
    2016, 2019
    Posts
    2,357

    Re: Vlookup behaving strangely

    sought column must be the 1st left

  3. #3
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,499

    Re: Vlookup behaving strangely

    you're using it incorrectly, vlookups don't look to the left, you need index/match for that.
    something like this... =INDEX(Sheet1!$A$1:$A$5,MATCH(Sheet2!B1,Sheet1!$B$1:$B$5,0))
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam Capricci

  4. #4
    Forum Expert avk's Avatar
    Join Date
    07-12-2007
    Location
    India
    MS-Off Ver
    Microsoft Office 2013
    Posts
    3,223

    Re: Vlookup behaving strangely

    Using reverse vlookup
    In sheet2 "A1"
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    But i suggest you, go with index match.
    This is for just for info.
    Refer Attach file.
    Attached Files Attached Files


    atul


    If my answer (or that of other members) has helped you, please say "Thanks" by clicking the Add Reputation button at the foot of one of their posts.

    Also: if your problem is solved, please take the time to mark your thread as SOLVED by going to the top of your first post, selecting "Thread Tools" and then "Mark thread as solved".

  5. #5
    Registered User
    Join Date
    04-19-2012
    Location
    East London, South Africa
    MS-Off Ver
    Office 2010
    Posts
    22

    Re: Vlookup behaving strangely

    Hi

    Thanks for the info, it makes more sense now. I have another issue, if the list is pulled from a database and we want to link a company to a guy based on supplier number (see attached), how would I do it? It seems to run through all the numbers and then stop. Should the numbers under column 'number' also be in ascending order? Lastly, if there are hidden rows, does this affect VLOOKUP?
    Attached Files Attached Files

  6. #6
    Forum Expert avk's Avatar
    Join Date
    07-12-2007
    Location
    India
    MS-Off Ver
    Microsoft Office 2013
    Posts
    3,223

    Re: Vlookup behaving strangely

    in expot sheet "F2"
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    and drag down till end.

  7. #7
    Registered User
    Join Date
    04-19-2012
    Location
    East London, South Africa
    MS-Off Ver
    Office 2010
    Posts
    22

    Re: Vlookup behaving strangely

    Solved guys, thanks for all the help. I used the index and match formula to sort out the issue. Thanks again!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] BorderAround behaving strangely
    By Purgatorium in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-10-2016, 10:37 PM
  2. [SOLVED] Vlookup behaving eratically and producing different results
    By markDuffy in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-17-2015, 09:29 AM
  3. [SOLVED] Lookup behaving strangely
    By markainsworth in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 10-29-2013, 10:09 AM
  4. IF formula behaving strangely in certain cells
    By gramomster in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-09-2013, 12:15 PM
  5. [SOLVED] Excel is behaving strangely for no apparent reason.
    By canyondude in forum Excel - New Users/Basics
    Replies: 4
    Last Post: 01-09-2006, 08:10 PM
  6. Excel 2003 behaving strangely
    By pinkshiro in forum Excel General
    Replies: 3
    Last Post: 08-12-2005, 08:05 AM
  7. Conditional formatting behaving strangely
    By Danny J in forum Excel General
    Replies: 10
    Last Post: 01-12-2005, 08:06 PM

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