How to find out a time

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

Guest

I have a column with the format of custom hh:mm. As you can guess its a list
of times.

In another column I want to have a 0 if the time is not between 8am and 6pm
and and a 1 if it is.

How can i do this?
 
Keith,

Put this alingside your first time and drag down:-


=IF(AND(A1>TIME(8,0,0),A1<TIME(18,0,0)),1,0)

Mike
 
=--AND(A1>=--"08:00",A1<=--"18:00")
or (if the column might be date & time, formatted to show just the time)
=--AND(MOD(A1,1)>=--"08:00",MOD(A1,1)<=--"18:00")
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top