+ Reply to Thread
Results 1 to 6 of 6

Vlookup udf not working

  1. #1
    Registered User
    Join Date
    07-27-2017
    Location
    London
    MS-Off Ver
    Mac MS 2016
    Posts
    5

    Vlookup udf not working

    Hi Guys!

    I have a user defined function which essentially performs a VLOOKUPand then CONCATENATES all the results in one cell. However, the result is #NAME? and I can't seem to suss it out!

    Please Login or Register  to view this content.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,206

    Re: Vlookup udf not working

    I don't know much about VBA, but should the first line actually be on two lines?
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    07-27-2017
    Location
    London
    MS-Off Ver
    Mac MS 2016
    Posts
    5

    Re: Vlookup udf not working

    I don't think so, I'm quite new to VBA myself so was hoping someone here could help me out haha

    From what I've seen online of User Defined Functions, they all use a similar syntax

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Vlookup udf not working

    You're getting a #NAME? error because Excel can't find the function. It needs to be in a standard code module in the workbook in which the formula appears:

    1. Press Alt+F11 to open the Visual Basic Editor (VBE)

    2. From the menu bar in the VBE window, do Insert > Module

    3. Paste the code in the window that opens

    4. Press Alt+Q to close the VBE and return to Excel
    Entia non sunt multiplicanda sine necessitate

  5. #5
    Registered User
    Join Date
    07-27-2017
    Location
    London
    MS-Off Ver
    Mac MS 2016
    Posts
    5

    Re: Vlookup udf not working

    It is in its own module

  6. #6
    Registered User
    Join Date
    07-27-2017
    Location
    London
    MS-Off Ver
    Mac MS 2016
    Posts
    5

    Re: Vlookup udf not working

    One thing I just noticed is that it does not accept any ranges from another sheet.

+ 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] VLOOKUP not working for me
    By musicgirl in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 04-05-2016, 05:43 AM
  2. Vlookup not working
    By VBA_Excel_help in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-29-2014, 08:54 AM
  3. [SOLVED] Vlookup is not working and giving =vlookup(B2,$T$2:$U$135,2,false) this kind of values.
    By yogeshsharma1981 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-09-2013, 04:08 PM
  4. Vlookup not working
    By Xx7 in forum Excel General
    Replies: 3
    Last Post: 07-05-2011, 05:35 PM
  5. Excel 2007 : VLOOKUP Not Working
    By HarvardMajesty in forum Excel General
    Replies: 2
    Last Post: 07-03-2011, 09:34 PM
  6. Vlookup Working
    By David Furtado in forum Excel General
    Replies: 2
    Last Post: 04-13-2011, 05:54 AM
  7. Vlookup not working
    By eminthepooh in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-24-2009, 04:16 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