• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

VBA code to update a sheet using the data in other sheets

sn152

Member
Hi All,

I am trying to update the attached workbook. It would be helpful if I have a macro for this. Sheet1 has the shift details. Sheet 2 has the required details about the team members. Now, Sheet 4 needs to be updated automatically when Sheet 1 is filled. That is, the macro shoudl take the shift details of each team member from Sheet1 and other details from Sheet2 and update it in Sheet4.
While filling Sheet4, for example if a team member's shift is like from 1st Aug to 3th Aug if he is coming in Third shift (T), then the first row should have details from 1st Aug to 3rd Aug. Then the second row should contain details of the next date.
Rules: 1) If there is a Shift Change, the macro should pick the previous date to that shift change and update in that row.
2) Only 2 Offs can be entered in one row.
For your reference, I have filled the details of 1 team member.
Please let me know if you need more info.
Kindly help me with this.

Thanks in advance!
 

Attachments

  • Sample Book.xlsx
    14 KB · Views: 2
Hi,

Could you please confirm..how do you consider your weeks..

The example that you have given of Ben...see the image
 

Attachments

  • Capture.JPG
    Capture.JPG
    20.7 KB · Views: 2
Hi Asheesh,

Thank for replying. We dont go by weeks. We go by the shift change and Offs. For example, From 1st aug to 3rd aug Ben comes in First shift (F) and from 4th Aug to 10th Aug he comes in Third shift (T). Then I would update the sheet4 as From date as 1-Aug-2015, To Date as 3-Aug-2015. Shift as F. On the next row I would update From date as 4-Aug-2015, To Date as 1-Aug-2015. Shift as T.
 
Back
Top