Copy and Rename Multiple Template Documents to Multiple New Folders

  • Dear experts


    I have found some code which will help me copy multiple documents from my existing template route folder and copy and rename them into new sub-folders based on the criteria in the cell on my document (which is attached).


    http://www.excelforum.com/exce…tiple-files-in-excel.html



    It only copies the files to the first sub-folder, obviously because of the lines

    Code
    src = Range("C5")
        'Destination directory
         dst = Range("D5")


    How does one change the code above to loop row by row, until the last folder reference in Column D, on Cell D31?


    Cheers
    P4

  • Re: Copy and Rename Multiple Template Documents to Multiple New Folders


    Maybe this. :cool:

  • Re: Copy and Rename Multiple Template Documents to Multiple New Folders


    Spot on Skywriter. I had tried something similar on the lines of what you did but not being excel savvy I was missing

    Code
    5 To lngLastRow


    Many thanks for your help

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!