+ Reply to Thread
Results 1 to 8 of 8

VBA Tool to seperate reports and populate list of excel files in a folder

  1. #1
    Registered User
    Join Date
    04-21-2013
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    7

    VBA Tool to seperate reports and populate list of excel files in a folder

    Hello I need help with a VBA Macro to work through column a (cost centre) in 2 tabs move these files to a new directory, look at the remaining files move these to a new destination folder and list these in an excel spread sheet.

    Firstly, it will look at the 1.Distribution list (tab 1) and carry out an 'exact
    match' against cost centre (please note this number can be varying in size and can be either numeric, or alphanumeric or a combination, this list will change from month to month) and move the excel files with these numbers from the its source folder to its destination folder:

    Source folder "C:\Users\TEST\Desktop\Report Seperator\1.All Reports"
    Destination folder called C:\Users\TEST\Desktop\Report Seperator\2.Distribution List

    Secondly, it will look at 2.Excusions (tab 3) and carry out an 'exact match' against cost centres (please note this number can be varying in size and can be either numeric, or alphanumeric or a combination, this list will change from month to month) and move the excel files with these numbers from the its source folder to its destination
    folder:

    Source folder "C:\Users\TEST\Desktop\Report Seperator\1.All Reports"
    Destination folder called C:\Users\TEST\Desktop\Report Seperator\3.Exclusions

    Finally, all the reports left within the source folder will need be moved to a new
    destination

    Source folder "C:\Users\TEST\Desktop\Report Seperator\1.All Reports"
    Destination folder C:\Users\TEST\Desktop\Report Seperator\3.New Centres.

    I would then like the script to look at Destination folder C:\Users\TEST\Desktop
    \Report Seperator\3.New Centres and capture these names within the tab 3.New Centres.
    I have drafted the input and output files in excel, if you require these please drop
    me a line.

    Many thanks for your help.

    P.S I have created the template if anyone needs to look at this.

  2. #2
    Forum Expert JapanDave's Avatar
    Join Date
    06-10-2008
    Location
    The grid, I got in!
    MS-Off Ver
    Excel 2010/13
    Posts
    1,696

    Re: VBA Tool to seperate reports and populate list of excel files in a folder

    Post the sample workbook.
    Be fore warned, I regularly post drunk. So don't take offence (too much) to what I say.
    I am the real 'Napster'
    The Grid. A digital frontier. I tried to picture clusters of information as they moved through the computer. What did they look like? Ships? motorcycles? Were the circuits like freeways? I kept dreaming of a world I thought I'd never see. And then, one day...

    If you receive help please give thanks. Click the * in the bottom left hand corner.

    snb's VBA Help Files

  3. #3
    Registered User
    Join Date
    04-21-2013
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: VBA Tool to seperate reports and populate list of excel files in a folder

    hello, does anyone know what site I could use to upload the workbook to so I can link her? I am not able to find a direct upload icon here?

    Many thanks

  4. #4
    Forum Expert JapanDave's Avatar
    Join Date
    06-10-2008
    Location
    The grid, I got in!
    MS-Off Ver
    Excel 2010/13
    Posts
    1,696

    Re: VBA Tool to seperate reports and populate list of excel files in a folder

    Attach a sample workbook. Make sure there is just enough data to make it clear what is needed. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are demonstrated, mock them up manually if needed. Remember to desensitize the data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic

  5. #5
    Registered User
    Join Date
    04-21-2013
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: VBA Tool to seperate reports and populate list of excel files in a folder

    Last edited by jackreacher39uk; 07-02-2013 at 02:42 AM. Reason: additional docs

  6. #6
    Registered User
    Join Date
    04-21-2013
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: VBA Tool to seperate reports and populate list of excel files in a folder

    I am having problems attaching a zip of the empty excel files, but basically, 2345 represents a centre number and one of the work books on a tab 1 one.

  7. #7
    Forum Expert JapanDave's Avatar
    Join Date
    06-10-2008
    Location
    The grid, I got in!
    MS-Off Ver
    Excel 2010/13
    Posts
    1,696

    Re: VBA Tool to seperate reports and populate list of excel files in a folder

    It has been a long day and the brain is not functioning as I would hope. Are you looking into directories to get the file and move them to a new one when you get a match?

  8. #8
    Registered User
    Join Date
    04-21-2013
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: VBA Tool to seperate reports and populate list of excel files in a folder

    Yes that is correct, all reports will be stored in one directory initially,

    C:\Users\TEST\Desktop\Report Seperator\1.All Reports

    These need to be moved to

    A) C:\Users\TEST\Desktop\Report Seperator\2.Distribution List


    B) C:\Users\TEST\Desktop\Report Seperator\3.Exclusions


    C) C:\Users\TEST\Desktop\Report Seperator\4.New Centres.

    Please note, tab C does not contain a list, so the script will need to move the files into a new directory and populate the list as per template.

    Many thanks
    Last edited by jackreacher39uk; 07-02-2013 at 05:34 AM.

+ 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