+ Reply to Thread
Results 1 to 2 of 2

vlookup in VB returns 2029 error

  1. #1
    Registered User
    Join Date
    02-22-2013
    Location
    Honolulu, Hawaii
    MS-Off Ver
    Excel 2007
    Posts
    7

    Angry vlookup in VB returns 2029 error

    hi all,
    I have a very simple vlookup statement:
    cells(x,1).value = [vlookup(cells(x,2).value),$W$2:$X$75,2,false)]
    and I'm get "#VALUE!" for all values of x

    When I run the statement in Immediate mode:
    ?[vlookup(cells(x,2).value,$W$2:$X$75,2,false)]
    I get Error 2015

    When I use an actual value for cells(x,2).value ( "Inactive" )
    ?[vlookup("Inactive",$W$2:$X$75,2,false)]
    I get the correct result, Oahu

    When I create a variable "V" and assign is the value "Inactive"
    ?[vlookup(V,$W$2:$X$75,2,false)]
    I get Error 2029

    When I put a formula into all the cells in row2:
    =VLOOKUP(B24059,W2:X75,2,FALSE)
    I get the correct value being returned.

    What is going on here?

    vlookup isn't rocket science, but my vb is not getting off the ground....

    Any help would be appreciated

  2. #2
    Forum Expert
    Join Date
    12-15-2009
    Location
    Chicago, IL
    MS-Off Ver
    Microsoft Office 365
    Posts
    3,177

    Re: vlookup in VB returns 2029 error

    Vlookup is on the Excel level not VBA level.

    Maybe cells(x,1).value = worksheetfunction.vlookup(cells(x,2).value,range("W2:X75"),2,false)

+ 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] error 2029 with match named range
    By darahsten in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-05-2013, 06:25 PM
  2. Error 2029 in LinEst
    By mst3k4L in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 11-10-2011, 06:23 PM
  3. macro interrupted error 2029
    By radame in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-26-2011, 02:59 PM
  4. Error 2029 - Trying to run an 07' file on 03'
    By PY_ in forum Excel General
    Replies: 2
    Last Post: 12-19-2010, 01:20 AM
  5. VBA Error 2029
    By John Eakins in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-19-2007, 03:48 PM

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