I am making a time sheet that calculate employee hours scheduled using a simple formula (b2-a2). My problem is when the scheduled out time goes to the next day (6:00pm to 1:00am) excel returns "#value". Please help.
dude2125
I am making a time sheet that calculate employee hours scheduled using a simple formula (b2-a2). My problem is when the scheduled out time goes to the next day (6:00pm to 1:00am) excel returns "#value". Please help.
dude2125
Try
VBA Noob=B1-A1+(A1>B1)
_________________________________________
Credo Elvem ipsum etian vivere
_________________________________________
A message for cross posters
Please remember to wrap code.
Forum Rules
Please add to your signature if you found this link helpful. Excel links !!!
That helped Thank You! I would also like to know if there is a way to convert the result into decimal form in the same formula.
dude2125
I have ran into another issue. If an employee is scheduled from 9 am to 5 pm the above formula calculate the time wrong 16 hours instead of 8.
dude2125
Try
or=(B1-A1+(A1>B1))*24
VBA Noob=(B1-A1)*24+(A1>B1)*24
I've assumed start time in A1 and end time in B1
VBA Noob
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks