ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   use the current time to return a value (https://www.excelbanter.com/excel-discussion-misc-queries/57548-use-current-time-return-value.html)

[email protected]

use the current time to return a value
 
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?


Bob Phillips

use the current time to return a value
 
=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)

wrote in message
ups.com...
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?




Gary''s Student

use the current time to return a value
 
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
--
Gary''s Student


"Bob Phillips" wrote:

=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)

wrote in message
ups.com...
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?






All times are GMT +1. The time now is 07:22 PM.

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