# Count the Hours between certain intervals

1. ## Count the Hours between certain intervals

Good Afternoon,

I am looking to calculate the total hours worked between certain intervals.

Column A - Date
Column B - Start Time
Column C - End Time
Column D - Time Between 6pm to 12am
Column E - Time Between 12am and 7am

I've tried used IF formula's but keep coming up with unusual numbers. Perhaps I am missing something

Any help is appreciated

Regards,

2. ## Re: Count the Hours between certain intervals

I'm assuming the Start time and End time can only fall within the same date. I.e. no start date 1-Jan and finish 2-Jan next day.

Using some dummy numbers. Here's what I got.
Row\Col
A
B
C
D
E
1
Date Start time End Time 1800:2400 0000:0700
2
Dates 8:00 PM 12:00 AM 4 -
3
Dates 3:00 AM 6:00 AM - 3
4
Dates 4:00 PM 11:00 PM 5 -
5
Dates 4:00 AM 12:00 PM - 3

Formula in D2 - copied down
Formula:
`Please Login or Register  to view this content.`

Formula in E2 - copied down
Formula:
`Please Login or Register  to view this content.`

Change the section in red to whatever time limit you want.
Note that, TIME(24,0,0) and TIME(0,0,0) is the same, i.e. =0. Hence, if you want 12AM as an end shift, you need to put in a 1 (see formula D2).

There are currently 1 users browsing this thread. (0 members and 1 guests)

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1