use the current time to return a value

S

sjd371

Simple formula? if the time is >=07:00:00<15:00:00, G$1. = 1 if time
=15:00:00 < 23:00:00 G$1 = 2 if Time >=23:00:00 < 07:00:00 G$1 = 3

I have tried to do this a few different ways and have been
unsuccessful. Could someone help please?
 
B

Bob Phillips

=IF(time_cell<TIME(7,0,0),3,IF(time_cell<TIME(15,0,0),1,IF(time_cell<TIME(23
,0,0),2,3)))

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)
 
G

Guest

If time is in A1 then in B1 put:
=A1/0.0416666666666666

In the cell of your choise put:
=(B1>=7)*(B1<15)*1+(B1>=15)*(B1<23)*2+(B1>=23)*3+(B1<7)*3
 

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

Top