# formula to insert 1 if time in and time out time is within the slots (military time)

1. ## formula to insert 1 if time in and time out time is within the slots (military time)

What type of formula to insert 1 if time in and time out time is within the slots (military time)or leave blank if not within slot range? Example:

Time In Time Out 7-8 8-9 9-10 10-11 11-12 12-13 13-14 14-15 15-16
09:00 11:10 1 1 1 1
12:00 15:00 1 1 1
7:00 9:00 1 1
10:00 12:20 1 1 1

I am trying to use spreadsheet to show how many cases were within each hour I will have dates and day of the week also, but this was the one I'm having a hard time with. Is this possible?

2. ## Re: Formula

I cannot post my formula.

Mod Edit:

=IF(OR(HOUR(\$A2)=COLUMN()+4,HOUR(\$B2+59/24/60)=COLUMN()+5,AND(HOUR(\$A2) < COLUMN()+4,HOUR(\$B2+59/24/60) > COLUMN()+5)),1,"")

3. ## Re: formula to insert 1 if time in and time out time is within the slots (military time)

Welcome to the forum.

Please take a moment to amend your thread title. Make sure that the title properly explains your request. Your title should be explicit and not be generic (this includes function names used without an indication of what you are trying to achieve).

Please see Forum Rule #1 about proper thread titles and adjust accordingly. To edit the thread title, open the original post to edit and then click on Go Advanced (bottom right) to access the area where you can edit your title.

(Note: this change is not optional. NAs you are new, I have done it for you this time.)

4. ## Re: Formula

How do I use this formula with 1/2 slots, like 7:30 - 12:30, 12:30 - 15:30?

5. ## Re: Formula

I like what this formula does. I need something similar. I need to calculated the minutes within a time slot. The time slots are in 1/2 hour increments. Example

7:30 - 12:30, 12:30 - 15:30
Times worked were:
7:15 - 14:30. I need a formula to calculate how many minutes worked between 7:30 - 12:30.
7:45 - 16:45 I need a formula to calculate how many minutes worked between 12:30 - 15:30.

6. ## Re: formula to insert 1 if time in and time out time is within the slots (military time)

This request might be resolved using a different arrangement/formula.
The formula could be: =(MIN(\$B4,C\$3)-MAX(\$A4,C\$2))*24*60
See that attached file for the arrangement.
Let us know if you have any questions.

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