See attachement for print screen and excel model.
Input from Workbook 1
Output to Workbook 2
What you will need to do
The print screen below represents a matrix that contain information from column A to column S and from row 1 to row 389. The number of row could growth.
I need a VBA script which will print in a new Excel sheet the jobs tasks indicated in the column F taking into account the frequency represented by the difference between the column K minus column J (column K - Column J).
Thus, if column K5 minus Column J5 equals 5 for example, this job task will have to be printed 5 times in the D column of this new Excel sheet. This must be done for all tasks between row 2 and row 389 relative to its corresponding frequency (column K & J).
Then, this VBA script will also have to indicate the date on the monthly date that these business dates associated with it represent. For example, suppose the cells F5 "d", if we have the number 4 in the column J5 and the number 9 in the column K5, we know that the frequency is 5 (9 - 4). Therefore, the VBA script will print "d" 5 times. Then, each of these occasions will have to be associated the dates of the current month.
Here, let's take November 2017 as an example and assume there is no holiday. Business day 4 is November 6, 2017 and business day 9 is November 13. Therefore, the VBA script should print “d” 5 times as per the following.
This will need to be done for every task in the column F as explained.
November 2017 (Country Canadian – Province Quebec Calendar)
Colonne F : Text (String) => This will be some job tasks.
Colonne J : Number1 => This is a number that represent the starting business day in a monthly or quarterly calendar. (this is technically the business date that represent the Job tasks starting date)
Colonne K : Number2 => This is a number that represent the ending business day in a monthly or quarterly calendar. (this is technically the business date that represent the Job tasks ending date)
Exemple : We have on cells F2 “a”, on cells J2 “5” and on cells K2 “5”.
This is meaning the job task “a” start on BD+5 and end on BD+5 of this month.
Pay attention: - When you have a negative number, this is meaning the job starting date is before the beginning current month.
- When you have “S.O.”, this is meaning there is no date available for this job task.
- For now, this is for a Monthly Calendar date, but eventually, it will also be for a quarterly calendar date.
- Business day 1 represent the first week day of the month. You will need to think about the possibility to add some holiday that would be taking in consideration in your calculation.
- The number of row could growth.
Hi, I've read your brief and I understand. May I ask your excel file? and may I do it in a document but in different sheets? so will there are input sheet and output sheet. I'm waiting your reply, Thank you.