+ Reply to Thread
Results 1 to 3 of 3

VBA Match Function Syntax Issue

  1. #1
    Registered User
    Join Date
    10-31-2013
    Location
    Shelton, CT
    MS-Off Ver
    Office 2010
    Posts
    4

    VBA Match Function Syntax Issue

    I have workbook A with Table A and Workbook B with Table B. I am looping through the rows of Table A in workbook A, selecting a cell value whose row number in Table B of Workbook B is what I want to find ( I need to pick out other columns from that row in Table B). The Match function works fine if I enter it in a cell as a Formula in Table A :

    =MATCH("FindThis",'[WorkbookB.xlsx]Sheet1'!A1:A1000, 0)

    However if I try this in VBA as:

    Please Login or Register  to view this content.
    I get a syntax error, "Expected List Separator or )". I have tried several variations of this , but continue to get syntax errors. Any ideas?

    I previously defined wkbkB as a Workbook set to WorkBook B's path, and activated Workbook B

    Thanks in advance for any help or time spent helping.
    Last edited by JBeaucaire; 01-27-2016 at 12:44 PM. Reason: Added missing CODE tags. Please read and follow the Forum Rules, link above in the menu bar. Thanks.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: VBA Match Function Syntax Issue

    Perhaps using your wkbkB variable:

    Please Login or Register  to view this content.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Forum Expert
    Join Date
    08-28-2014
    Location
    Texas, USA
    MS-Off Ver
    2016
    Posts
    1,796

    Re: VBA Match Function Syntax Issue

    Another approach:
    Please Login or Register  to view this content.
    I'm interested in starting a career working with VBA, if anyone knows of any opportunities!

+ 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. Invalid Index Match function Issue
    By olliek8 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-13-2015, 02:18 AM
  2. [SOLVED] MATCH FUNCTION Issue: Tracking Attendance for a Rolling Year
    By SRWilson87 in forum Excel Formulas & Functions
    Replies: 14
    Last Post: 04-27-2015, 11:40 AM
  3. VBA syntax for Index/Match function
    By SandPounder1 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-07-2014, 03:42 PM
  4. Issue with using Index Match function to return value from Summary Sheet
    By missmea2005 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-01-2013, 02:02 PM
  5. Match with Muliple Criteria VBA Syntax Issue
    By beat in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 04-23-2013, 09:13 AM
  6. [SOLVED] Syntax Issue
    By Vladamir in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-30-2012, 10:36 AM
  7. Replies: 4
    Last Post: 04-02-2012, 01:19 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