Time Formula Explanation Please

  • Thread starter Thread starter CharlesF
  • Start date Start date
C

CharlesF

I was given the formula below to calculate an employee's hours:
=(F4-C4+(F4<C4))*24 where C4 is Start Time and F4 is End Time.

I can understand the way the formula works in general, but can no
understand how the section (F4<C4) corrects the hours when and employe
starts work at 20:00 and finishes the next day at 06:00.

Can someone please enlighten me?

Thank
 
Hi Charles
The 'code' (F4<C4) would normally return TRUE or FALSE but when Excel
encounters a Boolean expression within an arithmetic formula, it returns 1
or 0. So if C4 is less than F4 (i.e. the clock swept passed midnight during
a shift) the formula adds 1.

Best wishes
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Complex If then? 4
Date & Time 1
Payment calculation 1
"or" formula 2
Conditional IF to use or / and 1
mod formula used with midnight 2
Time entry = Total Hours (rounded) ?? 1
Timesheet formula problem 2

Back
Top