+ Reply to Thread
Results 1 to 2 of 2

VBA Vlookup from another file

  1. #1
    Registered User
    Join Date
    09-17-2021
    Location
    Gdynia
    MS-Off Ver
    2016
    Posts
    66

    VBA Vlookup from another file

    I would like to make a vlookup function to another file which is my variable and paste it in this field :
    wb.Sheets("C_0901").Range("D6") .
    From this range of data:
    wbMe.Sheets("res_mat").Range("A3:B6").Copy

    I'm totally helpless I don't know how to do it
    Please Login or Register  to view this content.

  2. #2
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    6,274

    Re: VBA Vlookup from another file

    Are both workbooks open? What value are you looking for?

    In VBA, you need to use the object model rather than the ! form of the reference: this will find the value from D6 in A3:A6 and return the matching value from B3:B6 (or an error) to the variant vRet:



    Please Login or Register  to view this content.
    Bernie Deitrick
    Excel MVP 2000-2010

+ 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. Combine or vlookup from multiple file to master file
    By avijitsarkar in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-26-2021, 12:28 PM
  2. Replies: 1
    Last Post: 03-12-2019, 04:32 PM
  3. [SOLVED] Import data from .XLS, xlsx file into .xlsm file and do vlookup
    By pacificepoc in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-20-2018, 01:32 AM
  4. [SOLVED] Import .xls file in .xlsm file using macro and vlookup the sheets in new sheets
    By pacificepoc in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-16-2018, 04:06 AM
  5. VBA - User Prompted to choose source file for Vlookup, Error after file is opened
    By gcxp97 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 03-08-2016, 06:11 PM
  6. Vlookup, vlookup in external web Excel file
    By G.Bregvadze in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 05-15-2013, 02:10 AM
  7. Opening latest version of file and then doing vlookup in that file
    By Dan.carpe@gmail.com in forum Excel Programming / VBA / Macros
    Replies: 22
    Last Post: 12-11-2012, 12:43 PM

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