I have a task tracking sheet that multiple members of my team will be using. The idea it that each person will have their own worksheet within a signal workbook. Each sheet needs to function the same, the only difference will be the name associated with the sheet. This is the sheet:
And these are the current macros:
Sub Intialize()
Dim iRow As Long
iRow = Sheets("TimeTrackerJR").Range("H" & Application.Rows.Count).End(xlUp).Row + 1
'Code to Validate
If Sheets("TimeTrackerJR").Range("F" & iRow).Value = "" Then
Sheets("TimeTrackerJR").Range("B" & iRow).Value = Format([Today()], "DD-MMM-YYYY")
Sheets("TimeTrackerJR").Range("C" & iRow).Value = Application.UserName
End If
End Sub
Sub Start_Time()
Dim iRow As Long
iRow = Sheets("TimeTrackerJR").Range("H" & Application.Rows.Count).End(xlUp).Row + 1
'Code to Validate
If Sheets("TimeTrackerJR").Range("D" & iRow).Value = "" Then
MsgBox "Please select the Task Name from the drop down.", vbOKOnly + vbInformation, "Task Name Blank"
Sheets("TimeTrackerJR").Range("D" & iRow).Select
Exit Sub
ElseIf Sheets("TimeTrackerJR").Range("G" & iRow).Value <> "" Then
MsgBox "Start Time is aleady captured for the selected Task."
Exit Sub
Else
Sheets("TimeTrackerJR").Range("G" & iRow).Value = [Now()]
Sheets("TimeTrackerJR").Range("G" & iRow).NumberFormat = "hh:mm:ss AM/PM"
End If
End Sub
Sub End_Time()
Dim iRow As Long
iRow = Sheets("TimeTrackerJR").Range("I" & Application.Rows.Count).End(xlUp).Row + 1
'Code to Validate
If Sheets("TimeTrackerJR").Range("G" & iRow).Value = "" Then
MsgBox "Start Time has not been captured for this task."
Exit Sub
Else
Sheets("TimeTrackerJR").Range("H" & iRow).Value = [Now()]
Sheets("TimeTrackerJR").Range("H" & iRow).NumberFormat = "hh:mm:ss AM/PM"
Sheets("TimeTrackerJR").Range("I" & iRow).Value = Sheets("TimeTrackerJR").Range("H" & iRow).Value - Sheets("TimeTrackerJR").Range("G" & iRow).Value
Sheets("TimeTrackerJR").Range("I" & iRow).NumberFormat = "hh:mm:ss"
End If
'Fill the Date and Name in next row
Call Initialize
End Sub
Will I run into any issues copying this main sheet to other tabs?
JR Time Tracker.xlsm | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | |||
1 | |||||||||||
2 | |||||||||||
3 | Junior Manager Time Tracker | ||||||||||
4 | |||||||||||
5 | |||||||||||
6 | |||||||||||
7 | Date | Name | Task | Assigned By | Client | Start Time | End Time | Total Time | |||
8 | |||||||||||
9 | |||||||||||
10 | |||||||||||
11 | |||||||||||
12 | |||||||||||
13 | |||||||||||
14 | |||||||||||
15 | |||||||||||
16 | |||||||||||
17 | |||||||||||
18 | |||||||||||
19 | |||||||||||
20 | |||||||||||
21 | |||||||||||
22 | |||||||||||
23 | |||||||||||
24 | |||||||||||
25 | |||||||||||
26 | |||||||||||
27 | |||||||||||
28 | |||||||||||
29 | |||||||||||
30 | |||||||||||
31 | |||||||||||
32 | |||||||||||
33 | |||||||||||
34 | |||||||||||
35 | |||||||||||
36 | |||||||||||
37 | |||||||||||
38 | |||||||||||
39 | |||||||||||
40 | |||||||||||
41 | |||||||||||
42 | |||||||||||
43 | |||||||||||
44 | |||||||||||
45 | |||||||||||
46 | |||||||||||
TimeTrackerJR |
Cells with Data Validation | ||
---|---|---|
Cell | Allow | Criteria |
D8:D1048576 | List | =Support!$A$4:$A$31 |
E8:E1048576 | List | =Support!$C$4:$C$15 |
F8:F1048576 | List | =Support!$E$4:$E$100 |
And these are the current macros:
Sub Intialize()
Dim iRow As Long
iRow = Sheets("TimeTrackerJR").Range("H" & Application.Rows.Count).End(xlUp).Row + 1
'Code to Validate
If Sheets("TimeTrackerJR").Range("F" & iRow).Value = "" Then
Sheets("TimeTrackerJR").Range("B" & iRow).Value = Format([Today()], "DD-MMM-YYYY")
Sheets("TimeTrackerJR").Range("C" & iRow).Value = Application.UserName
End If
End Sub
Sub Start_Time()
Dim iRow As Long
iRow = Sheets("TimeTrackerJR").Range("H" & Application.Rows.Count).End(xlUp).Row + 1
'Code to Validate
If Sheets("TimeTrackerJR").Range("D" & iRow).Value = "" Then
MsgBox "Please select the Task Name from the drop down.", vbOKOnly + vbInformation, "Task Name Blank"
Sheets("TimeTrackerJR").Range("D" & iRow).Select
Exit Sub
ElseIf Sheets("TimeTrackerJR").Range("G" & iRow).Value <> "" Then
MsgBox "Start Time is aleady captured for the selected Task."
Exit Sub
Else
Sheets("TimeTrackerJR").Range("G" & iRow).Value = [Now()]
Sheets("TimeTrackerJR").Range("G" & iRow).NumberFormat = "hh:mm:ss AM/PM"
End If
End Sub
Sub End_Time()
Dim iRow As Long
iRow = Sheets("TimeTrackerJR").Range("I" & Application.Rows.Count).End(xlUp).Row + 1
'Code to Validate
If Sheets("TimeTrackerJR").Range("G" & iRow).Value = "" Then
MsgBox "Start Time has not been captured for this task."
Exit Sub
Else
Sheets("TimeTrackerJR").Range("H" & iRow).Value = [Now()]
Sheets("TimeTrackerJR").Range("H" & iRow).NumberFormat = "hh:mm:ss AM/PM"
Sheets("TimeTrackerJR").Range("I" & iRow).Value = Sheets("TimeTrackerJR").Range("H" & iRow).Value - Sheets("TimeTrackerJR").Range("G" & iRow).Value
Sheets("TimeTrackerJR").Range("I" & iRow).NumberFormat = "hh:mm:ss"
End If
'Fill the Date and Name in next row
Call Initialize
End Sub
Will I run into any issues copying this main sheet to other tabs?