+ Reply to Thread
Results 1 to 6 of 6

VBA for Application.Worksheetfunction.Vlookup not working

  1. #1
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,176

    VBA for Application.Worksheetfunction.Vlookup not working

    Hi All

    I had the same problem a few days ago, which was resolved by Norie...I made a silly mistake. Now, I know I am not being stupid, but seriously this is basics but I can't get it right....

    I have uploaded a sample file....My vlookup is not working with the Table
    Attached Files Attached Files
    Good Luck
    I don't presume to know what I am doing, however, just like you, I too started somewhere...
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the star to left of post [Add Reputation]
    Also....add a comment if you like!!!!
    And remember...Mark Thread as Solved.
    Excel Forum Rocks!!!

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: VBA for Application.Worksheetfunction.Vlookup not working

    Hi,

    The Combobox defaults to a string value however your lookup table has numerics in column A, so instead use code like:

    Please Login or Register  to view this content.
    Last edited by Richard Buttrey; 04-01-2017 at 01:54 PM.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,176

    Re: VBA for Application.Worksheetfunction.Vlookup not working

    Hi Richard

    Wow, seriously!!! Learn't something new today. Would never have known about default of combobox...Thanks so much. Any way how this line can be replaced with code for Table
    Please Login or Register  to view this content.

  4. #4
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: VBA for Application.Worksheetfunction.Vlookup not working

    Just substitute the A1 range reference with the name of that range, i.e. Table1.

    Please Login or Register  to view this content.

  5. #5
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,176

    Re: VBA for Application.Worksheetfunction.Vlookup not working

    Fantastic thanx Richard.

  6. #6
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: VBA for Application.Worksheetfunction.Vlookup not working

    Quote Originally Posted by sintek View Post
    Fantastic thanx Richard.
    My pleasure and glad to have helped.

+ 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] VBA for Application.Worksheetfunction.Vlookup not working
    By sintek in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 04-01-2017, 02:43 PM
  2. Vlookup with application.worksheetfunction in vba
    By jeroenft in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-10-2016, 11:38 AM
  3. [SOLVED] Application.WorksheetFunction.CountIf not working right
    By Cbrehm in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-20-2016, 04:49 PM
  4. Application.WorksheetFunction.VLookup
    By Perfexia in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-12-2014, 10:49 AM
  5. application.worksheetfunction.countfs() not working.
    By Lifeseeker in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-02-2012, 08:14 PM
  6. Application.WorksheetFunction.VLookup / Runtime 9
    By Tino XXL in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-25-2011, 04:29 AM
  7. Application.WorksheetFunction stops working if the Sub is called
    By emmalg in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 02-03-2011, 09:28 AM

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