Create a Macro to Merge a Datafile export with Excel Table Data RRS feed

  • Question

  • Hello All,

    I would like to try to create a macro to merge a datafile export with a static Excel Document that holds table data. I would expect the Table document to be the macro file. I am essentially trying to automate the vlookup process based on one column (Table data and datafile export have same value to look up). I also want to insert the extra table data into a specific columns in the data file. When I click the macro button, I would want it to open and browse for the saved excel datafile from a reporting tool.

    The lookup value in the datafile export is in Column G. Column G onwards in the data file has other data as well. I want to vlookup based on Column G and enter the table data in between Column G & H on the datafile.  The Table data has the lookup position in Column A and then I need the headers and data in Columns B to D to be inserted into the datafile between G & H. Hope this makes sense. I am relatively new to Macros and trying to learn. 

    Thanks for the help!

    Thursday, April 14, 2016 3:58 PM


All replies

  • Hi,

    This is the forum to discuss questions and feedback for Microsoft Excel, I'll move your question to the MSDN forum for Excel

    The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us. Thank you for your understanding.


    Emi Zhang
    TechNet Community Support

    Please mark the reply as an answer if you find it is helpful.

    If you have feedback for TechNet Support, contact

    Friday, April 15, 2016 7:04 AM
  • Hi, JMatheson

    According to your description, please correct me if I have any misunderstandings on your question, it seems that you want to merge Data from Multiple Workbooks into a Summary Workbook in Excel.
    So I suggest that you could refer to this article:

    In addition could you provide more information about issue, for example sample file, screen shot etc., that will help us resolve it.

    Thanks for your understanding.
    • Marked as answer by David_JunFeng Monday, April 25, 2016 4:11 AM
    Monday, April 18, 2016 9:25 AM