How to do a formula counting the number of hours between 2 times?

4

46Pam

We have some employees who work during a time which has a different hourly
rate than their usual rate. How can we do a formula that counts the number of
hours between 11 PM and 6 AM? The cells it would be looking at are coming
from an input log's cells that are formatted like this- 11:00 PM. We know how
to make it count all hours worked, but we want to say "if there are hours
between 11 PM and 6 AM, tell us how many there were.
Thanks!
 
F

Fred Smith

If your start time is in A1, and your end time in A2, use:
=((a2-a1)+(a2<a1))*24
to get the number of hours. Format as a number.

It doesn't matter how your times are formatted as long as they are times
(ie, not text).

Regards,
Fred
 

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

Top