Good afternoon,
I hope everyone in the community is doing well and enjoying 2016 so far. I'm in need of 2 macros to perform specific functions and was hoping someone could help. I will be as descriptive as possible in order to avoid confusion and make the task simpler to understand. They are as follows:
1. The first macro runs in workbook "OT TRACK" and prompts the user to pick a file. Once the file is picked, the macro displays the pay date located in cell "C3" of the picked work book (e.g. OT HOURS) in cell "B5" of "OT TRACK" and matches the locations in cells A7, A28, A44, A60, A76, A92, A108 and A124 with the sheets named the same in workbook "OT HOURS". When each sheet is found, it imports the employee name, current payroll OT and YTD OT for those employees into the first 3 columns of the respective tables (by location) in "OT TRACK". I'd also be obliged if the values displayed in column B for current OT are added to the existing value in the monthly actual for that row (JAN '16 ACT, FEB '16 ACT, etc.) based on the pay date. For example, if the pay date is 29th JANUARY 2016, then the value in column B against a name is incremented to the value in the JAN '16 ACT for that row. If the pay date is 9th FEBRUARY 2016, then it's incremented to FEB '16 ACT. I'm not sure if this is possible, but any help you can provide is greatly appreciated.
2. The second macro (also inside "OT TRACK") uses the names in the tables (that have already been imported by the previous macro) and compares the names with a file that the user picks. If a match is found in the sheets of this workbook (e.g. PAYROLL BUDGET 1), then the macro imports the budgeted hours for each month for that name (beginning from column G), subtracts 160 from it and displays it (only if positive) in JAN '16 BUD, FEB '16 BUD, etc. In the event that the name is found twice in the work book on different sheets, the budgeted hours should be added (column G of both sheets), 160 subtracted from it and displayed in JAN '16 BUD, etc. (Reference PAYROLL BUDGET 2 for this case)
I hope the explanation provided is clear and I sincerely appreciate and value all the help offered. I have attached the excel files in question for reference and aid.
Best wishes,
Hackboss
Bookmarks