Results 1 to 11 of 11

VLookup error in Excel 2011 for Mac Macro

Threaded View

  1. #1
    Registered User
    Join Date
    09-28-2012
    Location
    New York
    MS-Off Ver
    Excel 2010
    Posts
    7

    VLookup error in Excel 2011 for Mac Macro

    Hi,
    I have tried for hours to get a VLookup call in a macro to work. I am not experience VBA programmer, but I am very experienced in C++. Even a hard coded argument function does not work. I get various errors like 1004, 2015, etc

    Attached is a simple test worksheet that is labeled and has the code.

    The problem I want to solve is to take a delimited list as a string (e.g. "a,b,c,d") and extract each delimited item and use it to lookup in a table , then construct a delimited list of the looked up values. So If I had a table like a,1 b,2 c,3 d,4 then a,b,c,d would turn into 1,2,3,4
    The list can be an arbitrary length.

    The code supplied breaks the problem down into counting the terms (which works), Extract each term by an index with 1 being the first term (also works). The final step is to put the extract term into vlookup with the rest of the arguments (the table range, the column number and range lookup boolean) simply passed by the caller. The test spreadsheet show everything working in the spreadsheet (hard coded in terms of using the term values in vlookup). In the macro however, it just does not work. I am chalking it up to my inexperience with VBA. I appreciate the help.

    The macro is under Module
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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