TIME CONDITIONAL

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

COLUMN-A CONTAINS A DATE IN 24 HOUR DATE FORMAT SUCH AS
14:00. COLUMN-B NEEDS TO CONTAIN A 'Y' OR 'N' DEPENDING
ON THE COLUMN-A TIME. IF TIME IS FROM 03:00 TO 07:00
THEN 'Y' ELSE 'N'. HOW DO I ENTER THIS CONDITIONAL
STATEMENT?
 
Hi
first: please turn off your CAPS lock: difficult to read ans considered
as shouting in NGs

For your question: Enter the following in B1 (assumption: 03:00 ->
03:00 am, 07:00 -> 07:00 am)
=IF(AND(A1>=TIME(3,0,0),A1<=TIME(7,0,0)),"Y","N")
 
First, turn off Caps Lock.

Second, try

=IF(AND(HOUR(A1)>=3,HOUR(A1)<=7),"Y","N")

The formula will disregard the date information (if any) in A1 and just operate on the time part.

HTH
Anders Silven
 
Back
Top