+ Reply to Thread
Results 1 to 6 of 6

vlookup doesnt work to look into a table

  1. #1
    Registered User
    Join Date
    01-09-2021
    Location
    VANCOUVER, CANADA
    MS-Off Ver
    2019
    Posts
    7

    vlookup doesnt work to look into a table

    Hi,

    I have a user form which contains all the comboboxes and textboxes used in here.
    unique_ing_list is a tab in my workbook
    unique_ing is a table in that tab, it has 7 columns.
    the value i'm looking for IS in the table, combobox2 actually gets its values from a list which has the exact values as i am looking for so i know the issue is not that the value is not there.
    the code stops at "TextBox2.Value = Application.WorksheetFunction.VLookup(temp, Worksheets("UNIQUE_ING_LIST").ListObjects("UNIQUE_ING"), 3, False)"

    When I exit combobox2 i want textbox2 and textbox3 to populate with the data using the lookup function.


    Please Login or Register  to view this content.
    i appreciate everyones time in advace,

    thank you

  2. #2
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex
    MS-Off Ver
    365
    Posts
    5,808

    Re: vlookup doesnt work to look into a table

    Is the identifier used in the lookup (in this case 'temp') in the first column of the table?

    When you say the code stops at that line, do you mean it throws up an error? If so, what's the error message?

    Any chance of a sample workbook with this issue?

    BSB

  3. #3
    Registered User
    Join Date
    01-09-2021
    Location
    VANCOUVER, CANADA
    MS-Off Ver
    2019
    Posts
    7

    Re: vlookup doesnt work to look into a table

    BSB,

    1. Is the identifier used in the lookup (in this case 'temp') in the first column of the table?
    Yes, it is the ingredient name and it is in the first column which is column A as well.

    2. When you say the code stops at that line, do you mean it throws up an error? If so, what's the error message?
    when i run the form from the vba editor i get the following error.
    "unable to get the vlookup property of the worksheetfunction class"
    I have read that this error can come up if the vlookup doesnt find anything, which i see as impossible since the data is there.

    3. Any chance of a sample workbook with this issue?
    I am attaching a sample workbook.

    Thanks again
    Attached Files Attached Files

  4. #4
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex
    MS-Off Ver
    365
    Posts
    5,808

    Re: vlookup doesnt work to look into a table

    Add the bit in red and see if that works for you.

    Please Login or Register  to view this content.
    BSB

  5. #5
    Registered User
    Join Date
    01-09-2021
    Location
    VANCOUVER, CANADA
    MS-Off Ver
    2019
    Posts
    7

    Re: vlookup doesnt work to look into a table

    Wow! That was insanely simple but I would've never gotten it.
    works now!
    how come from a cell that "formula" would've worked but excel didn't like the reference to the whole table?

    thank you very much,

  6. #6
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex
    MS-Off Ver
    365
    Posts
    5,808

    Re: vlookup doesnt work to look into a table

    Because VBA can be a fickle beastie on occasions! :D

    Glad I could help.

    BSB

+ 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. Vlookup and index formulas doesnt work
    By ligaya in forum Excel General
    Replies: 12
    Last Post: 06-12-2017, 02:24 AM
  2. [SOLVED] VLOOKUP doesnt work with tables?
    By Immortal2014 in forum Excel General
    Replies: 3
    Last Post: 11-26-2016, 09:28 AM
  3. [SOLVED] How to get a VLOOKUP+MATCH formula to return 0 and not N/A when MATCH doesnt work
    By Renejorgensen in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-23-2016, 09:40 AM
  4. VLOOKUP doesnt work
    By lazy_tuna in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 05-08-2016, 10:50 AM
  5. [SOLVED] WorksheetFunction.VLookup doesnt work if result is #N/A
    By HerryMarkowitz in forum Excel - New Users/Basics
    Replies: 9
    Last Post: 03-11-2015, 10:40 AM
  6. Sorting doesnt work-sumproduct, vlookup,IF
    By koklok123 in forum Excel General
    Replies: 1
    Last Post: 05-06-2010, 10:11 AM
  7. Auto table feature in excel doesnt work on multiple tables
    By Chris Lampard in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 05-26-2006, 08:25 AM

Tags for this Thread

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