ok working on a time sheet
i wanted teh time sheet to take the emp start time from the top and use it
for the first entry when you enter a time it took it adds to the start time that duration of entry and makes a end time
then it checks then next lien and if therer is a duration it adds that to the end time and fills in the start and end time of each task
this is all working well
but i also want to factor in lunch so i ahve a place to enter start and end time for lunch and then i subtract them and return a time for lunch and i want to have the 'IF' command check to see if = "LUNCH" and if so take enter the start and stop times on the line = to the lunch data
the pre lunch code i came up with in not vba just in cell if but its getting to hard to see what is going to happen when it starts getting this long so i was thinking vba so it was less crammed together but im stumped on the call form a differnt sheet and several other issues
here is my excel sheet so you can look at the code layout ect
HERE is the vba i was working on
THANKS in ADV
i wanted teh time sheet to take the emp start time from the top and use it
for the first entry when you enter a time it took it adds to the start time that duration of entry and makes a end time
then it checks then next lien and if therer is a duration it adds that to the end time and fills in the start and end time of each task
this is all working well
but i also want to factor in lunch so i ahve a place to enter start and end time for lunch and then i subtract them and return a time for lunch and i want to have the 'IF' command check to see if = "LUNCH" and if so take enter the start and stop times on the line = to the lunch data
the pre lunch code i came up with in not vba just in cell if but its getting to hard to see what is going to happen when it starts getting this long so i was thinking vba so it was less crammed together but im stumped on the call form a differnt sheet and several other issues
here is my excel sheet so you can look at the code layout ect
HTML:
https://1drv.ms/f/s!AgOUefGjOY_Ze-wizge6eEM9tds
HERE is the vba i was working on
Private Sub minusLunch()
Dim LUNCH As interger
LUNCH = b8
If Range("B18") = Time(0, 0, 0) Then
Range(“d17”).Value = ""
ElseIf Range("B17") > Time(0, 0, 0) Then
Range(“d17”).Value = “”
End Sub