boomerang_1
New Member
- Joined
- Jun 27, 2019
- Messages
- 1
Hi All,
Just checking if anyone is able to assist me with setting up a code to add rows (based on a condition) and sum lines above.
Raw data is is below.
<tbody>
</tbody>
I would like the macro to do the following;
> If staff1 works from Mon-Fri (weekday), then add row and sum hours (bold font & top border if possible)
> If staff1 works form Sat to/or Sun (weekend), do nothing (i.e. just list the hours)
Result:
<tbody>
</tbody>
Thank you so much for your help.
Just checking if anyone is able to assist me with setting up a code to add rows (based on a condition) and sum lines above.
Raw data is is below.
State | Store | Staff Name | Day | Date | Hours Category 1 | Hours Category 2 | Hours Category 3 | Hours Category 4 |
State | Store 1 | Staff 1 | Tuesday | 11/06/19 | 8.55 | 8.50 | 0.05 | 0.00 |
State | Store 1 | Staff 1 | Wednesday | 12/06/19 | 8.17 | 8.12 | 0.05 | 0.00 |
State | Store 1 | Staff 1 | Thursday | 13/06/19 | 6.32 | 6.32 | 0.00 | 0.00 |
State | Store 1 | Staff 1 | Friday | 14/06/19 | 8.32 | 8.30 | 0.02 | 0.00 |
State | Store 1 | Staff 1 | Saturday | 15/06/19 | 6.93 | 6.93 | 0.00 | 0.00 |
State | Store 1 | Staff 2 | Tuesday | 11/06/19 | 8.28 | 8.23 | 0.05 | 0.00 |
State | Store 1 | Staff 2 | Wednesday | 12/06/19 | 7.42 | 7.42 | 0.00 | 0.00 |
State | Store 1 | Staff 2 | Thursday | 13/06/19 | 6.48 | 6.48 | 0.00 | 0.00 |
State | Store 1 | Staff 3 | Friday | 14/06/19 | 3.27 | 3.27 | 0.00 | 0.00 |
<tbody>
</tbody>
I would like the macro to do the following;
> If staff1 works from Mon-Fri (weekday), then add row and sum hours (bold font & top border if possible)
> If staff1 works form Sat to/or Sun (weekend), do nothing (i.e. just list the hours)
Result:
State | Store | Staff Name | Day | Date | Hours Category 1 | Hours Category 2 | Hours Category 3 | Hours Category 4 |
State | Store 1 | Staff 1 | Tuesday | 11/06/19 | 8.55 | 8.50 | 0.05 | 0.00 |
State | Store 1 | Staff 1 | Wednesday | 12/06/19 | 8.17 | 8.12 | 0.05 | 0.00 |
State | Store 1 | Staff 1 | Thursday | 13/06/19 | 6.32 | 6.32 | 0.00 | 0.00 |
State | Store 1 | Staff 1 | Friday | 14/06/19 | 8.32 | 8.30 | 0.02 | 0.00 |
31.35 | 31.23 | 0.12 | 0.00 | |||||
State | Store 1 | Staff 1 | Saturday | 15/06/19 | 6.93 | 6.93 | 0.00 | 0.00 |
State | Store 1 | Staff 2 | Tuesday | 11/06/19 | 8.28 | 8.23 | 0.05 | 0.00 |
State | Store 1 | Staff 2 | Wednesday | 12/06/19 | 7.42 | 7.42 | 0.00 | 0.00 |
State | Store 1 | Staff 2 | Thursday | 13/06/19 | 6.48 | 6.48 | 0.00 | 0.00 |
22.18 | 22.13 | 0.05 | 0.00 | |||||
State | Store 1 | Staff 3 | Friday | 14/06/19 | 3.27 | 3.27 | 0.00 | 0.00 |
3.27 | 3.27 | 0.00 | 0.00 |
<tbody>
</tbody>
Thank you so much for your help.