I have a workbook that for example sake we will call Monthly Dashboard, the information in this is created entirely from a separate workbook named Trial Balance, barring one cell. This data is going to be collected from a weekly workbook called Project Control. Project control files are saved in the format of YYYYWProjectControl.xlsx, where YYYY refers to the current year and W refers to the week.
The cell that needs to be filled is the total sales figure of all projects to date on the weekly form. What I need to do is programatically open the last created project control and take this sales figure out and close/save.
The closing and saving is all completed as part of a previous project but I need to know how to check what the current week number is and to check which the last created file is. Does anyone have any clue how to do this? If so please also bear in mind that with the end of the year approaching that January will need to search for the last created 2013 project control and if there is not one then it will need to search 2012.
Thanks in advance
Depending on whether you are referring to actual week or Fiscal (Financial) week then you can use either of these two functions to calculate for you:
Fiscal Week:
Or Actual Week: