Pineapple_Crazy
Board Regular
- Joined
- May 2, 2017
- Messages
- 51
Hi All,
I've been trying to develop some VBA that searches for a particular employee's name (garnered from another list I have) and sums the hours worked (minus anything associated with "lunch"). Basically this is a huge spreadsheet with many employees names listed at the very top of their hours worked. It is exported from a system that does not give a pretty output (lots of merging and other oddities).
I need to sum the hours in the "Reg", "OT", and "Other" columns that are not associated with "LUNCH" shown in the "Pay" column. I have pasted an example below. Basically for "John Smith" the summed hours should equate to 88.08 hours, minus the hour for lunch. Then for employee "Jimmy James" it should be 40.15 hours (minus the 3 hours for lunch). Please assume that the first column of "Company" starts in Column A. Any suggestions on how to tackle this one would be much appreciated, I haven't had much luck. Thanks!
<colgroup><col width="64" style="width:48pt" span="28"> </colgroup><tbody>
</tbody>
I've been trying to develop some VBA that searches for a particular employee's name (garnered from another list I have) and sums the hours worked (minus anything associated with "lunch"). Basically this is a huge spreadsheet with many employees names listed at the very top of their hours worked. It is exported from a system that does not give a pretty output (lots of merging and other oddities).
I need to sum the hours in the "Reg", "OT", and "Other" columns that are not associated with "LUNCH" shown in the "Pay" column. I have pasted an example below. Basically for "John Smith" the summed hours should equate to 88.08 hours, minus the hour for lunch. Then for employee "Jimmy James" it should be 40.15 hours (minus the 3 hours for lunch). Please assume that the first column of "Company" starts in Column A. Any suggestions on how to tackle this one would be much appreciated, I haven't had much luck. Thanks!
Lun/Brk | Stop | Reg | OT | Other | Pay | ||||||||||||||||||||||
Company | Division | Branch | Department | Rates | Day | Start Date & Time | Minutes | Time | Err | Hours | Hours | Hours | |||||||||||||||
00000628 - SMITH, JOHN | Hourly Rate: | 0 | |||||||||||||||||||||||||
S047 | 107 | 1050 | 100001 | None | 42705.354 | 12/1/2016 | 12/1/2016 | 1/30/1900 | 1/0/1900 | 42705.561 | 4.97 | REG | |||||||||||||||
S047 | 107 | 1050 | 100001 | None | 42705.582 | 12/1/2016 | 12/1/2016 | 1/0/1900 | 1/0/1900 | 42705.708 | 3.03 | REG | |||||||||||||||
S047 | 107 | 1050 | 100001 | None | 42705.708 | 12/1/2016 | 12/1/2016 | 1/0/1900 | 1/0/1900 | 42705.712 | 0.08 | DOVT | |||||||||||||||
S047 | 107 | 1050 | 100001 | None | 42706.354 | 12/2/2016 | 12/2/2016 | 1/30/1900 | 1/0/1900 | 42706.563 | 5 | REG | |||||||||||||||
S047 | 107 | 1050 | 100001 | None | 42706.583 | 12/2/2016 | 12/2/2016 | 1/0/1900 | 1/0/1900 | 42706.708 | 3 | REG | |||||||||||||||
S047 | 107 | 1050 | 100001 | None | 42707.36 | 12/3/2016 | 12/3/2016 | 1/30/1900 | 1/0/1900 | 42707.56 | 4.8 | REG | |||||||||||||||
S047 | 107 | 1050 | 100001 | None | 42707.581 | 12/3/2016 | 12/3/2016 | 1/0/1900 | 1/0/1900 | 42707.709 | 3.07 | REG | |||||||||||||||
S047 | 107 | 1050 | 100001 | None | 42707.709 | 12/3/2016 | 12/3/2016 | 1/0/1900 | 1/0/1900 | 42707.715 | 0.13 | OVT | |||||||||||||||
S047 | 107 | 1050 | 100001 | None | 42710 | 12/6/2016 | OH Record | 1 | LUNCH | ||||||||||||||||||
S047 | 107 | 1050 | 100001 | None | 42710.355 | 12/6/2016 | 12/6/2016 | 1/30/1900 | 1/0/1900 | 42710.564 | 5.02 | REG | |||||||||||||||
S047 | 107 | 1050 | 100001 | None | 42710.585 | 12/6/2016 | 12/6/2016 | 1/0/1900 | 1/0/1900 | 42710.709 | 2.98 | REG | |||||||||||||||
S047 | 107 | 1050 | 100001 | None | 42711.355 | 12/7/2016 | 12/7/2016 | 1/30/1900 | 1/0/1900 | 42711.562 | 4.97 | REG | |||||||||||||||
S047 | 107 | 1050 | 100001 | None | 42711.583 | 12/7/2016 | 12/7/2016 | 1/0/1900 | 1/0/1900 | 42711.709 | 3.03 | REG | |||||||||||||||
S047 | 107 | 1050 | 100001 | None | 42712.353 | 12/8/2016 | 12/8/2016 | 1/31/1900 | 1/0/1900 | 42712.557 | 4.88 | REG | |||||||||||||||
S047 | 107 | 1050 | 100001 | None | 42712.578 | 12/8/2016 | 12/8/2016 | 1/0/1900 | 1/0/1900 | 42712.708 | 3.1 | REG | |||||||||||||||
S047 | 107 | 1050 | 100001 | None | 42713 | 12/9/2016 | OH Record | 8 | PTOH | ||||||||||||||||||
S047 | 107 | 1050 | 100001 | None | 42714.358 | 12/10/2016 | 12/10/2016 | 1/30/1900 | 1/0/1900 | 42714.558 | 4.82 | REG | |||||||||||||||
S047 | 107 | 1050 | 100001 | None | 42714.579 | 12/10/2016 | 12/10/2016 | 1/0/1900 | 1/0/1900 | 42714.712 | 3.18 | REG | |||||||||||||||
S047 | 107 | 1050 | 100001 | None | 42717.355 | 12/13/2016 | 12/13/2016 | 1/30/1900 | 1/0/1900 | 42717.552 | 4.73 | REG | |||||||||||||||
S047 | 107 | 1050 | 100001 | None | 42717.573 | 12/13/2016 | 12/13/2016 | 1/0/1900 | 1/0/1900 | 42717.709 | 3.27 | REG | |||||||||||||||
S047 | 107 | 1050 | 100001 | None | 42718.354 | 12/14/2016 | 12/14/2016 | 1/30/1900 | 1/0/1900 | 42718.552 | 4.75 | REG | |||||||||||||||
S047 | 107 | 1050 | 100001 | None | 42718.573 | 12/14/2016 | 12/14/2016 | 1/0/1900 | 1/0/1900 | 42718.708 | 3.25 | REG | |||||||||||||||
S047 | 107 | 1050 | 100001 | None | 42719.366 | 12/15/2016 | 12/15/2016 | 1/30/1900 | 1/0/1900 | 42719.548 | 4.37 | REG | |||||||||||||||
S047 | 107 | 1050 | 100001 | None | 42719.569 | 12/15/2016 | 12/15/2016 | 1/0/1900 | 1/0/1900 | 42719.72 | 3.63 | REG | |||||||||||||||
S047 | 107 | 1050 | 100001 | None | 42719.72 | 42719.72 | 42719.72 | 0 | 0 | 42719.721 | 0.02 | DOVT | |||||||||||||||
Employee Total | 89.08 | = | 79.85 | 0.23 | 9 | ||||||||||||||||||||||
00001310 - JAMES, JIMMY | Hourly Rate: | 0 | |||||||||||||||||||||||||
S047 | 107 | 1050 | 105133 | None | 42706 | 42706 | OH Record | 1 | LUNCH | ||||||||||||||||||
S047 | 107 | 1050 | 105133 | None | 42706.353 | 42706.353 | 42706.353 | 31 | 0 | 42706.563 | 5.02 | REG | |||||||||||||||
S047 | 107 | 1050 | 105133 | None | 42706.584 | 42706.584 | 42706.584 | 0 | 0 | 42706.708 | 2.98 | REG | |||||||||||||||
S047 | 107 | 1050 | 105133 | None | 42706.708 | 42706.708 | 42706.708 | 0 | 0 | 42706.709 | 0.02 | DOVT | |||||||||||||||
S047 | 107 | 1050 | 105133 | None | 42707 | 42707 | OH Record | 1 | LUNCH | ||||||||||||||||||
S047 | 107 | 1050 | 105133 | None | 42707.353 | 42707.353 | 42707.353 | 28 | 0 | 42707.563 | 5.03 | REG | |||||||||||||||
S047 | 107 | 1050 | 105133 | None | 42707.583 | 42707.583 | 42707.583 | 0 | 0 | 42707.706 | 2.97 | REG | |||||||||||||||
S047 | 107 | 1050 | 105133 | None | 42707.706 | 42707.706 | 42707.706 | 0 | 0 | 42707.708 | 0.05 | DOVT | |||||||||||||||
S047 | 107 | 1050 | 105133 | None | 42708.376 | 42708.376 | 42708.376 | 30 | 0 | 42708.56 | 4.42 | REG | |||||||||||||||
S047 | 107 | 1050 | 105133 | None | 42708.581 | 42708.581 | 42708.581 | 0 | 0 | 42708.726 | 3.5 | REG | |||||||||||||||
S047 | 107 | 1050 | 105133 | None | 42708.726 | 42708.726 | 42708.726 | 0 | 0 | 42708.73 | 0.08 | OVT | |||||||||||||||
S047 | 107 | 1050 | 105133 | None | 42708.73 | 42708.73 | 42708.73 | 0 | 0 | 42708.731 | 0.03 | OVT | |||||||||||||||
00001310 - JAMES, JIMMY | Hourly Rate: | 0 | |||||||||||||||||||||||||
S047 | 107 | 1050 | 105133 | None | 42709.354 | 42709.354 | 42709.354 | 30 | 0 | 42709.559 | 4.92 | REG | |||||||||||||||
S047 | 107 | 1050 | 105133 | None | 42709.58 | 42709.58 | 42709.58 | 0 | 0 | 42709.708 | 3.08 | REG | |||||||||||||||
S047 | 107 | 1050 | 105133 | None | 42716 | 42716 | OH Record | 1 | LUNCH | ||||||||||||||||||
S047 | 107 | 1050 | 105133 | None | 42716.351 | 42716.351 | 42716.351 | 28 | 0 | 42716.562 | 5.05 | REG | |||||||||||||||
S047 | 107 | 1050 | 105133 | None | 42716.581 | 42716.581 | 42716.581 | 0 | 0 | 42716.704 | 2.95 | REG | |||||||||||||||
S047 | 107 | 1050 | 105133 | None | 42716.704 | 42716.704 | 42716.704 | 0 | 0 | 42716.706 | 0.05 | DOVT | |||||||||||||||
Employee Total | 43.15 | = | 39.92 | 0.23 | 3 |
<colgroup><col width="64" style="width:48pt" span="28"> </colgroup><tbody>
</tbody>