+ Reply to Thread
Results 1 to 5 of 5

Vlookup from another workbook Using R1C1 Notation

  1. #1
    Registered User
    Join Date
    04-29-2019
    Location
    Tampa, Florida
    MS-Off Ver
    Office 365
    Posts
    8

    Vlookup from another workbook Using R1C1 Notation

    Hi,

    I am building a macro to open a workbook and import data from that workbook using VLOOKUP.

    I am getting a Run-time error '13' Type mismatch

    The code uses FileDialog to prompt user to select the file.
    Then I have used variables to store the workbook name and sheet name.
    I then use those variables to set range variables to plug into the VLOOKUP formula.
    The line of code triggering the error is the .formulaR1C1 line.

    Any help to figure out what is wrong would be appreciated.

    Please Login or Register  to view this content.

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,644

    Re: Vlookup from another workbook Using R1C1 Notation

    Try replacing tblMRP with tblMRP..Address(ReferenceStyle:=xlR1C1), do the same for headerMRP.
    Please Login or Register  to view this content.
    If posting code please use code tags, see here.

  3. #3
    Registered User
    Join Date
    04-29-2019
    Location
    Tampa, Florida
    MS-Off Ver
    Office 365
    Posts
    8

    Re: Vlookup from another workbook Using R1C1 Notation

    Thank you for that reply. That solved the error message but the formula that writes to the range is missing the reference to the new workbook so I get #n/a in the cells. Any idea why that might be happening?

  4. #4
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,644

    Re: Vlookup from another workbook Using R1C1 Notation

    Try this.
    Please Login or Register  to view this content.
    Last edited by Norie; 11-20-2020 at 10:36 AM.

  5. #5
    Registered User
    Join Date
    04-29-2019
    Location
    Tampa, Florida
    MS-Off Ver
    Office 365
    Posts
    8

    Re: Vlookup from another workbook Using R1C1 Notation

    Norie, that was awesome. That did the trick. I can't thank you enough.

+ 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] Simplifying R1C1 Notation
    By PercivalP in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 11-13-2018, 08:43 AM
  2. [SOLVED] Using R1C1 notation
    By samot79 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-10-2018, 04:19 PM
  3. R1C1 notation in a FormulaArray
    By n043480 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-10-2016, 05:29 AM
  4. R1C1 notation
    By samot79 in forum Excel General
    Replies: 4
    Last Post: 12-11-2014, 06:32 AM
  5. [SOLVED] What is the advantage of A1 or R1C1 Notation ?
    By nur2544 in forum Excel General
    Replies: 1
    Last Post: 02-08-2013, 12:18 PM
  6. Sum Columns:R1C1 notation
    By Zone in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-17-2006, 11:05 AM
  7. R1C1 Notation in VBA
    By Fred Holmes in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-21-2005, 05:05 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