Lovelylou79
New Member
- Joined
- Sep 4, 2017
- Messages
- 37
Hi there,
I am looking for some help regarding identifying differences between a recorded amount of hours and the recorded duration (Start/end Time).
In the following table Duration is calculated using "=B2-A2+(A2>L2).
Row 1 would not need highlighting as duration is less than 60 minutes over the hours, Row 2 would need to be highlighted as hours are less than duration, Row 3 hours and duration match so no highlight is needed, and Row 4 hours are higher than the duration.
I would prefer this in vba as it is part of a larger function. Thank you!!
[TABLE="class: grid, width: 500, align: center"]
<tbody>[TR]
[TD]Hours[/TD]
[TD]Start Time[/TD]
[TD]End Time[/TD]
[TD]Duration[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]07:45[/TD]
[TD]11:30[/TD]
[TD]03:45[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]12:30[/TD]
[TD]17:30[/TD]
[TD]05:00[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]13:00[/TD]
[TD]16:00[/TD]
[TD]03:00[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]16:00[/TD]
[TD]17:30[/TD]
[TD]01:30[/TD]
[/TR]
</tbody>[/TABLE]
I am looking for some help regarding identifying differences between a recorded amount of hours and the recorded duration (Start/end Time).
In the following table Duration is calculated using "=B2-A2+(A2>L2).
Row 1 would not need highlighting as duration is less than 60 minutes over the hours, Row 2 would need to be highlighted as hours are less than duration, Row 3 hours and duration match so no highlight is needed, and Row 4 hours are higher than the duration.
I would prefer this in vba as it is part of a larger function. Thank you!!
[TABLE="class: grid, width: 500, align: center"]
<tbody>[TR]
[TD]Hours[/TD]
[TD]Start Time[/TD]
[TD]End Time[/TD]
[TD]Duration[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]07:45[/TD]
[TD]11:30[/TD]
[TD]03:45[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]12:30[/TD]
[TD]17:30[/TD]
[TD]05:00[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]13:00[/TD]
[TD]16:00[/TD]
[TD]03:00[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]16:00[/TD]
[TD]17:30[/TD]
[TD]01:30[/TD]
[/TR]
</tbody>[/TABLE]