+ Reply to Thread
Results 1 to 2 of 2

Macro to find files in directory and copy data from specific cells to this worksheet

Hybrid View

oksox Macro to find files in... 02-22-2019, 07:30 PM
JLGWhiz Re: Macro to find files in... 02-22-2019, 07:52 PM
  1. #1
    Registered User
    Join Date
    02-22-2019
    Location
    oklahoma
    MS-Off Ver
    2016
    Posts
    1

    Macro to find files in directory and copy data from specific cells to this worksheet

    Please help, I'm total noob with vba. Here is what I would like to do. I have a summary file that I use to check the status of projects in other files. Here is what I would like to do:
    1. create a macro that will loop through the list of files
    2. find each file in the directory based on a partial name
    3. Copy data from a specific cell from each file and past in the master list.
    4. there is data in the cell already to skip and loop to the next file.

    Below is a crude example of the check summary list where the data should be pasted.

    Any help would be greatly appreciated.

    list.PNG

  2. #2
    Forum Expert JLGWhiz's Avatar
    Join Date
    02-20-2011
    Location
    Florida, USA
    MS-Off Ver
    Windows 10, Excel 2013
    Posts
    2,070

    Re: Macro to find files in directory and copy data from specific cells to this worksheet

    Hi oksox, welcome to the forum. There are lots of members who would be willing to help you, but you post is missing information that is essential to writing a workable code. Here is what you need to provide.
    1. If the target files are in a different directory than your summary file, lisit the directory path.
    2. Specify what the partial file name is that you want to search for. eg. "Checklist"
    3. If there is a possibility that the same file could be in the directory with different file extenstions, i.e. xlsx and xlsm, then specify the file extensions for the files you want.
    4. If you want to copy a specific range, specify the sheet name and range address, eg. Sheet 1, A2:Z20 or Columns C and D.
    5. Specify the destination for the copied data.
    6. If merged cells are in the data range to be copied, you might need to unmerge them for the code to run properly.

    That should be a good start for getting someone to suggest some code for you.
    Any code provided by me should be tested on a copy or a mock up of your original data before applying it to the original. Some events in VBA cannot be reversed with the undo facility in Excel. If your original post is satisfied, please mark the thread as "Solved". To upload a file, see the banner at top of this page.
    Just when I think I am smart, I learn something new!

+ 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] macro to copy excel files only from main directory and sub directory to a specific folder
    By JEAN1972 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-05-2019, 09:49 AM
  2. Replies: 0
    Last Post: 03-13-2013, 09:08 PM
  3. [SOLVED] Copy specific files from one directory to another
    By brazil in forum Excel General
    Replies: 2
    Last Post: 03-06-2013, 03:56 PM
  4. Replies: 0
    Last Post: 11-26-2012, 05:51 PM
  5. macro to copy a specific worksheet from all open files into one file
    By Manjula1 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-08-2012, 03:49 AM
  6. Copy selected files into a specific directory
    By Wizz in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-29-2009, 10:50 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