+ Reply to Thread
Results 1 to 2 of 2

Macro VLookup Syntax problem

  1. #1
    Registered User
    Join Date
    01-21-2009
    Location
    Rugby, England
    MS-Off Ver
    Excel 2007
    Posts
    22

    Macro VLookup Syntax problem

    I'm struggling to get the syntax correct to use the VLookup function in a Worksheet Macro. The two dimensional table is held in a different worksheet from the active worksheet. The index is held in a string variable "ThisCell", the table is held in "Sheet3" at array A1:B1154. I'm looking for an exact match from column 2 to be placed in the string variable "MyData".
    My current attempt is:
    MyData=Application.WorksheetFunction.VLookup(ThisCell,"Sheet3"!A1:B1154,2,False)
    Many thanks.

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,532

    Re: Macro VLookup Syntax problem

    Please put code inside code tags, see my signature.

    Try this:
    Please Login or Register  to view this content.
    [/COLOR][/SIZE][/FONT]
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

+ Reply to Thread

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