Hello,
Attached I have a spreadsheet that has a start time, lunch out, lunch in, end time.
I need help creating a formula for the total time worked.
Thanks for any help with this formula.
Nick
Hello,
Attached I have a spreadsheet that has a start time, lunch out, lunch in, end time.
I need help creating a formula for the total time worked.
Thanks for any help with this formula.
Nick
Nick
Try this formula,
=IF(E2<B2,E2+1-B2, E2-B2)-(D2-C2)
and format the cell as [mm] to display minutes.
If posting code please use code tags, see here.
If you want the result in hh:mm:ss format, you can put this formula in F2:
=E2-B2-(D2-C2)+(B2>E2)
If you want it as decimal hours, you can multiply that whole formula by 24, i.e.:
=(E2-B2-(D2-C2)+(B2>E2))*24
and format the cell as General.
Hope this helps.
Pete
Thanks Pete_UK, "=(E2-B2-(D2-C2)+(B2>E2))*24" worked.
"=E2-B2-(D2-C2)+(B2>E2)" gave me a result of .34 hours, but if I use the second option it shows 8.15
Your result of 0.34 is not hours, it's days.
You need to apply the hh:mm:ss format (or just hh:mm) to your "Hours worked" column as noted in the first line of Pete's post #3 above.
Thank you PMGeoffW283, AMPete_UK & AMNorie!
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks