ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Greater than/Less than a certain Time (revisited) (https://www.excelbanter.com/excel-worksheet-functions/120075-greater-than-less-than-certain-time-revisited.html)

Phrank

Greater than/Less than a certain Time (revisited)
 
Hello,

I posted a question a couple days ago, and although it seemed that
things were working ok, they weren't. I've got a date/time stamp IN
in column A, and a date/time stamp OUT in column B. I need column C
to say Yes if the time OUT is less than 3:30 PM, and NO if the time
out is after 3:30 PM. The format in both the IN and the OUT columns
is 'mm/dd/yy h:mm AM/PM' (e.g., 11/24/06 9:39 AM). Below are the two
formulas that I have tried:

=IF(J2="","",IF(J2<="3:30 PM","Yes","No"))
=IF(J2="","",IF(J2<TIMEVALUE("3:30 PM"),"yes","no"))

What adjustments do I need to make to this? Thanks for any help.

Frank

T. Valko

Greater than/Less than a certain Time (revisited)
 
Try this:

=IF(J2="","",IF(MOD(J2,1)<TIME(15,30,0),"Yes","No" ))

Biff

"Phrank" wrote in message
...
Hello,

I posted a question a couple days ago, and although it seemed that
things were working ok, they weren't. I've got a date/time stamp IN
in column A, and a date/time stamp OUT in column B. I need column C
to say Yes if the time OUT is less than 3:30 PM, and NO if the time
out is after 3:30 PM. The format in both the IN and the OUT columns
is 'mm/dd/yy h:mm AM/PM' (e.g., 11/24/06 9:39 AM). Below are the two
formulas that I have tried:

=IF(J2="","",IF(J2<="3:30 PM","Yes","No"))
=IF(J2="","",IF(J2<TIMEVALUE("3:30 PM"),"yes","no"))

What adjustments do I need to make to this? Thanks for any help.

Frank




Phrank

Greater than/Less than a certain Time (revisited)
 
Beautiful! Works great. Thanks Biff!!!

Frank

On Sat, 25 Nov 2006 00:01:04 -0500, "T. Valko"
wrote:

Try this:

=IF(J2="","",IF(MOD(J2,1)<TIME(15,30,0),"Yes","No "))

Biff

"Phrank" wrote in message
.. .
Hello,

I posted a question a couple days ago, and although it seemed that
things were working ok, they weren't. I've got a date/time stamp IN
in column A, and a date/time stamp OUT in column B. I need column C
to say Yes if the time OUT is less than 3:30 PM, and NO if the time
out is after 3:30 PM. The format in both the IN and the OUT columns
is 'mm/dd/yy h:mm AM/PM' (e.g., 11/24/06 9:39 AM). Below are the two
formulas that I have tried:

=IF(J2="","",IF(J2<="3:30 PM","Yes","No"))
=IF(J2="","",IF(J2<TIMEVALUE("3:30 PM"),"yes","no"))

What adjustments do I need to make to this? Thanks for any help.

Frank



T. Valko

Greater than/Less than a certain Time (revisited)
 
You're welcome. Thanks for the feedback!

Biff

"Phrank" wrote in message
...
Beautiful! Works great. Thanks Biff!!!

Frank

On Sat, 25 Nov 2006 00:01:04 -0500, "T. Valko"
wrote:

Try this:

=IF(J2="","",IF(MOD(J2,1)<TIME(15,30,0),"Yes","N o"))

Biff

"Phrank" wrote in message
. ..
Hello,

I posted a question a couple days ago, and although it seemed that
things were working ok, they weren't. I've got a date/time stamp IN
in column A, and a date/time stamp OUT in column B. I need column C
to say Yes if the time OUT is less than 3:30 PM, and NO if the time
out is after 3:30 PM. The format in both the IN and the OUT columns
is 'mm/dd/yy h:mm AM/PM' (e.g., 11/24/06 9:39 AM). Below are the two
formulas that I have tried:

=IF(J2="","",IF(J2<="3:30 PM","Yes","No"))
=IF(J2="","",IF(J2<TIMEVALUE("3:30 PM"),"yes","no"))

What adjustments do I need to make to this? Thanks for any help.

Frank





Phrank

Greater than/Less than a certain Time (revisited)
 
Hi again,

As I said, this works great. However, it does focus only on the
time, regardless of the day. What would I need to add to also have it
look at the day? For example, if someone turned something IN on one
day, and it wasn't returned (OUT) until the next day, I need it to
return 'No' also. As it is right now, as long as it is before 3:30,
it doesn't matter if the OUT date is a month after the item was turned
IN. Thanks for any additional help.

Frank

On Sat, 25 Nov 2006 00:01:04 -0500, "T. Valko"
wrote:

Try this:

=IF(J2="","",IF(MOD(J2,1)<TIME(15,30,0),"Yes","No "))

Biff

"Phrank" wrote in message
.. .
Hello,

I posted a question a couple days ago, and although it seemed that
things were working ok, they weren't. I've got a date/time stamp IN
in column A, and a date/time stamp OUT in column B. I need column C
to say Yes if the time OUT is less than 3:30 PM, and NO if the time
out is after 3:30 PM. The format in both the IN and the OUT columns
is 'mm/dd/yy h:mm AM/PM' (e.g., 11/24/06 9:39 AM). Below are the two
formulas that I have tried:

=IF(J2="","",IF(J2<="3:30 PM","Yes","No"))
=IF(J2="","",IF(J2<TIMEVALUE("3:30 PM"),"yes","no"))

What adjustments do I need to make to this? Thanks for any help.

Frank



Phrank

Greater than/Less than a certain Time (revisited)
 
Hi again,

I found a way to do this. Instead of having one column for the IN and
the OUT with a date/time stamp, I split each of these into two
columns, one with date and the other with time. Then, in the column
that asks if the item was returned (OUT) before 3:30, I put this
formula:

=IF(L7="","",IF(AND(DATEDIF(A7,B7,"D")=0,MOD(C7,1) <TIME(15,30,0)),"Yes","No"))

It works great. Thanks again for looking and with your help.

Frank


All times are GMT +1. The time now is 12:49 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com