+ Reply to Thread
Results 1 to 5 of 5

Do Index Match Match to pull data from multiple worbooks

  1. #1
    Registered User
    Join Date
    07-07-2020
    Location
    Panama
    MS-Off Ver
    365
    Posts
    5

    Do Index Match Match to pull data from multiple worbooks

    Hi, I want to do a Macro that performs an "index match match" to pull data from multiple workbooks that are closed and on Dropbox.

    The names of the workbooks depend on the value of a cell and the value of an input box. The value of the input box also influences the path.

    I'm getting error '1004' when I run it. I've tried using WorksheetFunction.index and WorksheetFunction.match as well as ExecuteExcel4Macro but I get error on both.

    Code is below:

    HTML Code: 
    The ExecuteExcel4Macro is commented because I'm either using WorksheetFunction or ExecuteExcel4Macro but wanted to include both since I don't know which one I should use and what's the error in the code.

    Thanks,
    Luis

  2. #2
    Forum Expert
    Join Date
    07-06-2004
    Location
    Northern California
    MS-Off Ver
    2K, 2003, 2010, O365
    Posts
    1,490

    Re: Do Index Match Match to pull data from multiple worbooks

    Is this a Sub or a Function? If a Function, are you trying to call it from a cell formula?

    Anyway, why "/[" rather than "\[" in the line where you set PathFileSheet?

    I've never tried to use Application.WorksheetFunction methods (functions) with references into closed workbooks. Have you tried this before and had it work?

    I believe you'll need to use ExcecuteExcel4Macro, but is your system using R1C1 addressing by default? Even if it were, I'm not sure ExecuteExcel4Macro accepts it.

    Does

    Please Login or Register  to view this content.
    produce the expected results?
    Last edited by hrlngrv; 10-24-2020 at 01:39 AM.

  3. #3
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,560

    Re: Do Index Match Match to pull data from multiple worbooks

    1) Change path separator from / to \
    2)
    Please Login or Register  to view this content.
    Too many double quotes before first PathFileSheet.
    Cell reference for ExecuteExcel4Macro must be R1C1 notation.

  4. #4
    Registered User
    Join Date
    07-07-2020
    Location
    Panama
    MS-Off Ver
    365
    Posts
    5

    Re: Do Index Match Match to pull data from multiple worbooks

    Hi, I tried changing the / to \ but had the same error, also eliminating the extra double quotes. I'll link a thread here as reference as I used that macro (which works) as a base for this one. The other macro uses "/" for the path.

    https://www.excelforum.com/excel-programming-vba-macros/1321244-pulling-data-from-another-workbook-which-name-depends-on-cell.html

    I really appreciate your help.

    Thanks!

  5. #5
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,560

    Re: Do Index Match Match to pull data from multiple worbooks

    Let's see what message comes up.
    Please Login or Register  to view this content.

+ 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. Replies: 4
    Last Post: 04-14-2017, 07:47 PM
  2. Match Index between Worbooks
    By kharding15 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-07-2015, 12:40 PM
  3. INDEX MATCH and INDIRECT to pull in data from multiple worksheets
    By nebshaver123 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 04-16-2015, 03:58 PM
  4. Replies: 3
    Last Post: 05-19-2014, 02:01 PM
  5. Issue using Index/Match to pull multiple occurrences of "Match" criteria
    By aridfriedman in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-09-2014, 11:38 AM
  6. Replies: 10
    Last Post: 12-18-2012, 07:59 AM
  7. Replies: 5
    Last Post: 01-05-2011, 03:13 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