+ Reply to Thread
Results 1 to 6 of 6

Vlookup

  1. #1
    Registered User
    Join Date
    12-16-2009
    Location
    Malaysia
    MS-Off Ver
    Excel 2007
    Posts
    3

    Vlookup

    Hey guys, i'm trying to create a database of usernames and guids, i have already update my a database of 1811 entries, with username, and guid. now i need to add the user id to that list on another column. i have a sql dump on another excel file which has the username and user id. how do to create a vlookup to return the user id based on the username from the sql dump? or is there another easier function to use, everytime i try something its says n/a

  2. #2
    Forum Expert darkyam's Avatar
    Join Date
    03-05-2008
    Location
    Houston, TX
    MS-Off Ver
    2013
    Posts
    2,191

    Re: Vlookup

    Assuming the user names match perfectly, if the sql dump is in a book called SQL and on sheet 1, it should be =VLOOKUP(A1,[SQL.xlsx]Sheet1!$A$1:$B$1811,2,0) copied down.

  3. #3
    Registered User
    Join Date
    12-16-2009
    Location
    Malaysia
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Vlookup

    what if i have the name and guid list on sheet 1 and the name and user id copied to sheet 2?

  4. #4
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: Vlookup

    You mean they are in the same workbook instead of two different files? then just change the reference for the lookup table in darkyam's formula

    =VLOOKUP(A1,Sheet2!$A$1:$B$1811,2,0)

  5. #5
    Registered User
    Join Date
    12-16-2009
    Location
    Malaysia
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Vlookup

    Well its not working, its returning a N/A

  6. #6
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: Vlookup

    When Vlookup returns a #NA it means that the lookup value can not be found.

    Do a visual check and if you think that the lookup value actually should be found, check if the two cells are really the same. Are there trailing spaces in one of the cells? Then the two cells are not the same, i.e.

    "John Doe" is not the same as "John Doe "

    You must ensure that your lookup value and the values in the first column of the lookup table match, so you may need to trim off the spaces.

    You can insert a column in your lookup table, then enter

    =trim(a1)
    and copy this down all rows of the table. Now copy the result column and use Paste special - Values to paste it back onto the original data. Delete the column with the formula.

    Now check your Vlookup again? does it return the value?

    If not, you may want to upload a data sample for further inspection.

    cheers

+ 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