+ Reply to Thread
Results 1 to 6 of 6

Import .xls file in .xlsm file using macro and vlookup the sheets in new sheets

  1. #1
    Registered User
    Join Date
    08-14-2018
    Location
    India
    MS-Off Ver
    2016
    Posts
    46

    Import .xls file in .xlsm file using macro and vlookup the sheets in new sheets

    Hi,

    I want to import 2 .xls file "BW GL .XLS" & "ECC GL.XLS" in "PP.xlsm file". After importing in need to vlook up those file based on "GL_ACCOUNT" column in "BW GL.xls" and "G/L acct" in " ECC GL.XLS" into new sheet called "Reconcile"

    I am able to import the .xls file but after importing i m not able to perform the vlookup on it.

    PP.xlsm has "Button 3" where i have written the macro code.
    Attached Files Attached Files
    Last edited by pacificepoc; 08-15-2018 at 10:43 PM. Reason: adding file

  2. #2
    Registered User
    Join Date
    08-14-2018
    Location
    India
    MS-Off Ver
    2016
    Posts
    46

    Re: Import .xls file in .xlsm file using macro and vlookup the sheets in new sheets

    Can any one has idea how to do it?

  3. #3
    Valued Forum Contributor kasan's Avatar
    Join Date
    07-22-2009
    Location
    Riga, Latvia
    MS-Off Ver
    Excel 2010
    Posts
    680

    Re: Import .xls file in .xlsm file using macro and vlookup the sheets in new sheets

    Hi,
    You've mentioned some columns for lookups, but what exactly you need to lookup? What is the base data? What is "FDW GL"?
    Please state your problem more clear, like: I need to take all values from sheet "FDW GL" column "LOC_GL_ACCOUNT_CODE" and lookup values from this column in sheets "BW GL" and "ECC GL". If match is found, then ... if not ...

  4. #4
    Registered User
    Join Date
    08-14-2018
    Location
    India
    MS-Off Ver
    2016
    Posts
    46

    Re: Import .xls file in .xlsm file using macro and vlookup the sheets in new sheets

    Hi Kasan,

    The base file is "ECC GL.XLS", column G/L acct.
    The column "GL_ACCOUNT" from BW GL .XLS & column "LOC_GL_ACCOUNT_CODE" from FDW.xlsx needs to be vlookup with the column "G/L acct" from "ECC GL.XLS".

    I have wriiten code to import these 3 files from a particular path, after importing i need to vlookup as mentioned whihc is not happeinng as of now, getting some error. The vlookup should happen in a sheet name called "Reconcile"

  5. #5
    Valued Forum Contributor kasan's Avatar
    Join Date
    07-22-2009
    Location
    Riga, Latvia
    MS-Off Ver
    Excel 2010
    Posts
    680

    Re: Import .xls file in .xlsm file using macro and vlookup the sheets in new sheets

    Try this one. Run the same Sub Reconcile().
    Specially corrected one value in each sheet (BW GL and FDW GL) to test, you will see #N/A in first two rows.
    Dont know what is COA on Reconcile sheet, what do you expect to get there?
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    08-14-2018
    Location
    India
    MS-Off Ver
    2016
    Posts
    46

    Re: Import .xls file in .xlsm file using macro and vlookup the sheets in new sheets

    Hi kasan,

    Thanks for your help, its working fine as of now.
    I will test and let you know if i need anything more.
    Thanks again

+ 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] Import Multiple Sheets from one file
    By capson in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-14-2015, 07:36 PM
  2. Import Multiple Sheets from one file
    By capson in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-14-2015, 11:26 AM
  3. Import Multiple Sheets from one file
    By capson in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-14-2015, 11:04 AM
  4. Replies: 3
    Last Post: 05-21-2013, 08:22 AM
  5. Save file xls file as xlsm - macro won't run in xlsm workbook
    By captbluefin in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-07-2012, 11:39 AM
  6. Import specific sheets from different file.
    By fatalcore in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-27-2011, 09:44 AM
  7. macro to import specific sheets with value in a file
    By aravindhan_31 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-04-2009, 10:55 AM

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