+ Reply to Thread
Results 1 to 4 of 4

Code to Include File name in the macro for merging data from workbooks to Worksheet

  1. #1
    Registered User
    Join Date
    05-23-2012
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    37

    Code to Include File name in the macro for merging data from workbooks to Worksheet

    The below mentioned macro merges all the data from excel files in the specific folder into the sheet named Master.
    All workbooks in the folder contain data from Col. A to Col.Y.
    Please Login or Register  to view this content.
    The requirement is

    The filename( excluding extension, .xls, .xlsx, .xlsm etc) to be included in Col.Z for each entry from the particular file.

  2. #2
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Code to Include File name in the macro for merging data from workbooks to Worksheet

    if I understand well what do you want you have to add after
    Please Login or Register  to view this content.
    this line
    Please Login or Register  to view this content.
    Last edited by Cutter; 07-21-2012 at 12:51 PM. Reason: Added code tags

  3. #3
    Registered User
    Join Date
    05-23-2012
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    37

    Re: Code to Include File name in the macro for merging data from workbooks to Worksheet

    Thanks for your response..
    This code is not working.
    It doesnt display any filename

  4. #4
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Code to Include File name in the macro for merging data from workbooks to Worksheet

    try
    Please Login or Register  to view this content.
    Last edited by Cutter; 07-21-2012 at 12:51 PM. Reason: Added code tags

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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