Hi all,
I have a problem with my timesheet. I need it to round up and down in 15 minute increments. I have been able to create it using this message board (yes I just borrowed your brilliance) and I'm sure there's an easy way to do this but since I don't understand it I can't fix it. I have borrowed a vb code to get me started and in each cell there is a formula to enter and calculate the time automatically by double clicking. So here you go and btw Thanks.
This is the code I borrowed:
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
If Target.Count > 1 Then Exit Sub
If Target.Row < 7 Or Target.Row > 12 Then Exit Sub
If Target.Column < 3 Or Target.Column > 6 Then Exit Sub
ActiveSheet.Unprotect "password"
Application.EnableEvents = False
Target.Value = Time
ActiveSheet.Protect "password"
Application.EnableEvents = True
End Sub
Each cell in the daily total column is the following:
=((F7-C7+(F7<C7))-(E7-D7+(E7<D7)))*24
In the weekly total column the formula is basic:
=SUM(G7:H11)
All of which work awesome!!! Except for the 15 minutes rounding.
Thank you, Please help quickly.
Bohica
I have a problem with my timesheet. I need it to round up and down in 15 minute increments. I have been able to create it using this message board (yes I just borrowed your brilliance) and I'm sure there's an easy way to do this but since I don't understand it I can't fix it. I have borrowed a vb code to get me started and in each cell there is a formula to enter and calculate the time automatically by double clicking. So here you go and btw Thanks.
This is the code I borrowed:
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
If Target.Count > 1 Then Exit Sub
If Target.Row < 7 Or Target.Row > 12 Then Exit Sub
If Target.Column < 3 Or Target.Column > 6 Then Exit Sub
ActiveSheet.Unprotect "password"
Application.EnableEvents = False
Target.Value = Time
ActiveSheet.Protect "password"
Application.EnableEvents = True
End Sub
Each cell in the daily total column is the following:
=((F7-C7+(F7<C7))-(E7-D7+(E7<D7)))*24
In the weekly total column the formula is basic:
=SUM(G7:H11)
All of which work awesome!!! Except for the 15 minutes rounding.
Thank you, Please help quickly.
Bohica