+ Reply to Thread
Results 1 to 8 of 8

Vlookup not returning proper data

  1. #1
    Registered User
    Join Date
    01-06-2005
    Posts
    6

    Vlookup not returning proper data

    =vlookup(A1,VENDOR,1,FALSE)
    is returning #n/a

    =vlookup(A1, vendor,1,true)
    is returning the row above the correct name.

    i have my data sorted ascending, and the range named Vendor. It is alphabetical, so I thought true should work, but either way shouldnt false work?

    I am very confused about True or False in Vlookups...any recommendations?

  2. #2
    Forum Expert
    Join Date
    06-18-2004
    Location
    Canada
    MS-Off Ver
    Office 2016
    Posts
    1,474
    If you're looking for an 'exact' match, use FALSE. In this case, if it doesn't find an exact match, it returns #N/A.

    If you're looking for an approximate match, use TRUE. In this case, if it doesn't find a n exact match, it returns the largest value that is less than the lookup value.

    If you'd like help with the formula, please provide some details.

    Hope this helps!

    Quote Originally Posted by shineboxnj
    =vlookup(A1,VENDOR,1,FALSE)
    is returning #n/a

    =vlookup(A1, vendor,1,true)
    is returning the row above the correct name.

    i have my data sorted ascending, and the range named Vendor. It is alphabetical, so I thought true should work, but either way shouldnt false work?

    I am very confused about True or False in Vlookups...any recommendations?

  3. #3
    Forum Expert
    Join Date
    12-24-2004
    Location
    Sweden
    Posts
    1,256
    Try make a test:
    If VENDOR =B1:B100 and the name that should be found is in B10.
    Try test if A1=B10

    Ola Sandstrom


    Note:
    Check that there are no blanks at the end: "Vendor1 " v.s. "Vendor1".
    Blanks can be removed by the TRIM function (that is All blanks).

  4. #4
    Registered User
    Join Date
    01-06-2005
    Posts
    6
    the match is definitely there in VENDOR, exactly the same as cell A1. False just is not returning it, and True is returning the row above it.

    Vendor is a list of all the vendors and addresses.
    A1 is the vendor name, the formula is in B1.

    Mark

  5. #5
    Forum Expert
    Join Date
    06-18-2004
    Location
    Canada
    MS-Off Ver
    Office 2016
    Posts
    1,474
    Quote Originally Posted by shineboxnj
    the match is definitely there in VENDOR, exactly the same as cell A1. False just is not returning it, and True is returning the row above it.
    Have you tried Ola's suggestion? So, for example, if A1 contains the vendor name and B10 contains that value, try...

    =A1=B10

    ...what result does the formula return?


    Vendor is a list of all the vendors and addresses.
    A1 is the vendor name, the formula is in B1.
    If your list of vendors and addresses is contain in one column, try...

    =VLOOKUP(A1&"*",VENDOR,1,0)

    Hope this helps!

  6. #6
    Registered User
    Join Date
    01-06-2005
    Posts
    6
    =A1=b10 returned False

    the vendor list is on a different worksheet...when i put the formula on the same worksheet it works fine. but i cant keep it there, so i need to figure out why it wouldnt work looking up from a seperate sheet. I have 4 different sheets looking up different sheets the same way without a problem, but this ones not working.

    Mark

  7. #7
    Forum Expert
    Join Date
    06-18-2004
    Location
    Canada
    MS-Off Ver
    Office 2016
    Posts
    1,474
    Quote Originally Posted by shineboxnj
    =A1=b10 returned False
    Check to make sure that there are no extra spaces in the cells.

  8. #8
    Registered User
    Join Date
    01-06-2005
    Posts
    6
    thats exactly what it was.. there were 5 blank spaces after the text that was exported from our warehouse software. I used the trim function, and it worked perfectly.
    Wow that drove me nuts!

    thanks for everyones help.

    Mark

+ 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