Dear Excel Users, I have a time-sheet where employees book their time worked on various Jobs. Each Job (Reg5) also have certain activities (Reg6) connected to it. There is also an Hours Worked Textbox (Reg7). So it means a person will fill in the time sheet for each job he has done a day. For example Tom has worked on three jobs on Monday so he enters the time sheet and captures his time.... the First Job was 1 hour, the second 3 hrs and the last 4 hrs to make up for the 8 hours a day. Currently I have a counter that shows the time booked and the time left but it is not working perfectly. What I want is the following each time Tom fills in the time sheet the counters add up the hours if he gets past 8 hrs it must give a warning. Also on a Friday it is only 6 hrs total work time. The counter must be able to recognize each employee and counts their time book individually. The data is captured on Sheet 2 (Data) - Date, Weekday, LastName, FirstName, Job, Activity ID, Hours Worked and Payroll category.
Please have a look and give me some advice...a solution will be greatly appreciated. Thank You!! I have also tried on Excel forum but no solution - I cannot use conditional formatting as the data sheet feeds into another program. https://www.excelforum.com/excel-programming-vba-macros/1209937-sum-hours-booked-per-employee.html
Please have a look and give me some advice...a solution will be greatly appreciated. Thank You!! I have also tried on Excel forum but no solution - I cannot use conditional formatting as the data sheet feeds into another program. https://www.excelforum.com/excel-programming-vba-macros/1209937-sum-hours-booked-per-employee.html
Code:
<code>Private Sub Reg7_change()
Application.DisplayAlerts = False
Application.ScreenUpdating = False
On Error Resume Next
Sheets.Add
Range("A1").Formula = "=SUMIFS(Data!I:I,Data!C:C," & Reg1.Value & ",Data!E:E," & Reg3.Value & ",Data!F:F," & Reg4.Value & ")+ " & Reg7.Value & ""
Label29 = Range("A1").Value
Label32 = 8 - Label29
ActiveSheet.Delete
On Error GoTo 0
Application.DisplayAlerts = True
Application.ScreenUpdating = True
End Sub</code>
Last edited: