Time Between 2 times?

MarkJamesDavies

New Member
Joined
Jan 30, 2015
Messages
12
Hi,

I need a way to work out if a time is between 2 times including the original time. Please see below for example;

[TABLE="width: 520"]
<tbody>[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Sign out time[/TD]
[TD]sign in time[/TD]
[TD]1:00[/TD]
[TD]1:15[/TD]
[TD]1:30[/TD]
[TD]1:45[/TD]
[TD]2:00[/TD]
[TD]2:15[/TD]
[TD]2:30[/TD]
[TD]2:45[/TD]
[/TR]
[TR]
[TD]1:00[/TD]
[TD]2:15[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

so IF there is a sign out time at 1:00, C3 should populate with YES or FALSE if it doesn't.

I've tired to use OR, MIN, MAX, IF, AND....But I just can't get it right.

PLEASE can someone help, I've spent over 9 hours staring at my laptop today. I'd be happy to make a donation to the site if it can be solved. It's driving me nuts.

I just need to break down the duration into 15 minutes.

Thank you in advance!

M
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
Is this what you are looking for:


Unknown
ABCDEFGHIJ
2Sign out timesign in time01:0001:1501:3001:4502:0002:1502:3002:45
301:0002:15YesYesYesYesYesYesFALSEFALSE
401:3002:30FALSEFALSEYesYesYesYesYesFALSE
Sheet2
Cell Formulas
RangeFormula
C3=IF((C$2>=$A3)*(C$2<=$B3),"Yes",FALSE)
 
Last edited:
Upvote 0
Is this what you are looking for:

Unknown
ABCDEFGHIJ
Sign out timesign in time

<tbody>
[TD="align: center"]2[/TD]

[TD="align: right"]01:00[/TD]
[TD="align: right"]01:15[/TD]
[TD="align: right"]01:30[/TD]
[TD="align: right"]01:45[/TD]
[TD="align: right"]02:00[/TD]
[TD="align: right"]02:15[/TD]
[TD="align: right"]02:30[/TD]
[TD="align: right"]02:45[/TD]

[TD="align: center"]3[/TD]
[TD="align: right"]01:00[/TD]
[TD="align: right"]02:15[/TD]
[TD="align: center"]Yes[/TD]
[TD="align: center"]Yes[/TD]
[TD="align: center"]Yes[/TD]
[TD="align: center"]Yes[/TD]
[TD="align: center"]Yes[/TD]
[TD="align: center"]Yes[/TD]
[TD="align: center"]FALSE[/TD]
[TD="align: center"]FALSE[/TD]

[TD="align: center"]4[/TD]
[TD="align: right"]01:30[/TD]
[TD="align: right"]02:30[/TD]
[TD="align: center"]FALSE[/TD]
[TD="align: center"]FALSE[/TD]
[TD="align: center"]Yes[/TD]
[TD="align: center"]Yes[/TD]
[TD="align: center"]Yes[/TD]
[TD="align: center"]Yes[/TD]
[TD="align: center"]Yes[/TD]
[TD="align: center"]FALSE[/TD]

</tbody>
Sheet2

[TABLE="width: 85%"]
<tbody>[TR]
[TD]Worksheet Formulas[TABLE="width: 100%"]
<tbody>[TR]
[TH]Cell[/TH]
[TH="align: left"]Formula[/TH]
[/TR]
[TR]
[TH]C3[/TH]
[TD="align: left"]=IF((C$2>=$A3)*(C$2<=$B3),"Yes",FALSE)[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]

This works great apart from the 12am hour - if I put the sign out time as 00:01 and have the time 00:00 in C1, it doesn't work for me. Am I doing something wrong here?



ABCDEFGHIJ
Sign out timesign in time

<tbody>
[TD="align: center"]2[/TD]

[TD="align: right"]00:00[/TD]
[TD="align: right"]00:15[/TD]
[TD="align: right"]00:30[/TD]
[TD="align: right"]00:45[/TD]
[TD="align: right"]01:00[/TD]
[TD="align: right"]01:15[/TD]
[TD="align: right"]01:30[/TD]
[TD="align: right"]01:45[/TD]

[TD="align: center"]3[/TD]
[TD="align: right"]00:01[/TD]
[TD="align: right"]02:15[/TD]
[TD="align: center"]FALSE[/TD]
[TD="align: center"]Yes[/TD]
[TD="align: center"]Yes[/TD]
[TD="align: center"]Yes[/TD]
[TD="align: center"]Yes[/TD]
[TD="align: center"]Yes[/TD]
[TD="align: center"]Yes[/TD]
[TD="align: center"]Yes[/TD]

[TD="align: center"]4[/TD]
[TD="align: right"]01:30[/TD]
[TD="align: right"]02:30[/TD]
[TD="align: center"]FALSE[/TD]
[TD="align: center"]FALSE[/TD]
[TD="align: center"]FALSE[/TD]
[TD="align: center"]FALSE[/TD]
[TD="align: center"]FALSE[/TD]
[TD="align: center"]FALSE[/TD]
[TD="align: center"]Yes[/TD]
[TD="align: center"]Yes[/TD]

</tbody>

Thank you in advance!

M
 
Last edited:
Upvote 0

Unknown
ABCDEFGHIJ
2Sign out timesign in time00:0000:1500:3000:4501:0001:1501:3001:45
300:0102:15YESYESYESYESYESYESYESYES
401:3002:30FALSEFALSEFALSEFALSEFALSEFALSEYESYES
500:3001:15FALSEFALSEYESYESYESYESFALSEFALSE
601:0002:15FALSEFALSEFALSEFALSEYESYESYESYES
Sheet2
Cell Formulas
RangeFormula
C3=IF((LOOKUP($A3,$C$2:$J$2)<=C$2)*(C$2<=$B3),"YES","FALSE")
 
Last edited:
Upvote 0

Forum statistics

Threads
1,226,074
Messages
6,188,729
Members
453,495
Latest member
Pippie4trnc

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top