Renaming master file each morning.

  • Question

    I have a master excel file that every morning gets opened and then a save as is done named as the relevant day IE 10 and throughout the day the excel sheet is compiled with the date for the day to each machine being we have 40 machines and every morning having to transfer the last line of data to the new file takes time.

    So, the question is, is it possible to somehow take the last line of date from the newly named sheet for each machine and place it in to the master document in the first line to the relevant machine this will save a lot of time of having to input the data manually then I can just do a save as and start again?

    I hope this makes sense of what am trying to ask.

    i have never done anything with VBA before so would not even no where to start.



    Thanks

  • Hello,


    What you aiming for is indeed possible ... :)


    Are you working with a dedicated folder in which the 40 different files are stored ?


    Since a macro would need to loop through the 40 workbooks to retrieve the required data ...


    Hope this will help

    If you feel like saying "Thank You" for the help received, do not hesitate to click the "Smiley" icon, below, in the bottom right corner :)

  • Hi Carim


    it's not 40 different files i have one master excel file that contains the 40 machines so it would be just the one file but renamed each morning but the master would be a static file and folder and would never move or be renamed. the excel is in the first post.


    the good but is you say it's possible the only problem is how it's done i have not done any VBA work and would not no where to start.


    Thanks

  • Hi,


    My understanding is that your 'Master Shift Log' is collecting data and is, by design, your Destination file.


    My question is related to where is located the data to be retrieved ... i.e. where is(are) the Source file(s) ... ??? ;)

    If you feel like saying "Thank You" for the help received, do not hesitate to click the "Smiley" icon, below, in the bottom right corner :)

  • Oh ok apologies' so the saved file will go in to a set folder IE year/month and file named as the relevant day 22.


    2022/November/11

  • Oh ok apologies' so the saved file will go in to a set folder IE year/month and file named as the relevant day 22.


    2022/November/11

    Not sure to understand your remark ... :/


    Do you mean that your master file has to import the date ... from the sub-folder name ???

    If you feel like saying "Thank You" for the help received, do not hesitate to click the "Smiley" icon, below, in the bottom right corner :)

  • Hello,


    Do you mind posting the full names for the files and the directories ....

    If you feel like saying "Thank You" for the help received, do not hesitate to click the "Smiley" icon, below, in the bottom right corner :)

  • Carim

    Changed the title of the thread from “master file and renaming it each morning.” to “Renaming master file each morning.”.
  • Hi Carim


    this is the location of the files


    Master Shift Log will always be in this location and name will not change

    P:\wold\Moulding\01 Shift Log\Master Shift Log.xlsx


    Saved file will go to the relevant folder and month named as the day

    P:\wold\Moulding\01 Shift Log\2022\November

  • Hi again,


    To get you started, attached is your test file in order to list all your folders with Name - Date Created - Date Last Modified


    Hope this will help

Participate now!

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