Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Cell value determined by the current time and date

I need a cells value to be displayed depending on the what the current time
of day it is. If the current time is between midnight and noon, then I want
the cell to equal "3rd Shift". If not, then the cell should be "1st Shift".
Any ideas on the best way to accomplish this?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,520
Default Cell value determined by the current time and date

=IF(HOUR(NOW())<=12,"3rd Shift","1st Shift")

If this post helps click Yes
---------------
Jacob Skaria


"jschae" wrote:

I need a cells value to be displayed depending on the what the current time
of day it is. If the current time is between midnight and noon, then I want
the cell to equal "3rd Shift". If not, then the cell should be "1st Shift".
Any ideas on the best way to accomplish this?

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default Cell value determined by the current time and date

Try,

=IF(TIME(HOUR(NOW()),MINUTE(NOW()),0)TIME(12,0,0) ,"1st Shift","3rd Shift")

Mike

"jschae" wrote:

I need a cells value to be displayed depending on the what the current time
of day it is. If the current time is between midnight and noon, then I want
the cell to equal "3rd Shift". If not, then the cell should be "1st Shift".
Any ideas on the best way to accomplish this?

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,651
Default Cell value determined by the current time and date

Wouldn't that give 3rd shift for times up to 12:59:59.999 ?
You could try
=IF(MOD(NOW(),1)<=0.5,"3rd Shift","1st Shift")
--
David Biddulph

"Jacob Skaria" wrote in message
...
=IF(HOUR(NOW())<=12,"3rd Shift","1st Shift")

If this post helps click Yes
---------------
Jacob Skaria


"jschae" wrote:

I need a cells value to be displayed depending on the what the current
time
of day it is. If the current time is between midnight and noon, then I
want
the cell to equal "3rd Shift". If not, then the cell should be "1st
Shift".
Any ideas on the best way to accomplish this?



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,520
Default Cell value determined by the current time and date

Thanks David for pointing that out...

Another way..
=IF(TEXT(NOW(),"AM/PM")="AM","3rd Shift","1st Shift")

If this post helps click Yes
---------------
Jacob Skaria


"David Biddulph" wrote:

Wouldn't that give 3rd shift for times up to 12:59:59.999 ?
You could try
=IF(MOD(NOW(),1)<=0.5,"3rd Shift","1st Shift")
--
David Biddulph

"Jacob Skaria" wrote in message
...
=IF(HOUR(NOW())<=12,"3rd Shift","1st Shift")

If this post helps click Yes
---------------
Jacob Skaria


"jschae" wrote:

I need a cells value to be displayed depending on the what the current
time
of day it is. If the current time is between midnight and noon, then I
want
the cell to equal "3rd Shift". If not, then the cell should be "1st
Shift".
Any ideas on the best way to accomplish this?




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
updated cell with current time\date if any data in a row has chan pmj Excel Worksheet Functions 4 August 27th 07 08:28 PM
Click a cell and update to current time / date ? Eric Excel Discussion (Misc queries) 3 October 4th 06 12:12 AM
Current date and time when different cell = X Workaholic Excel Worksheet Functions 3 August 13th 06 12:49 AM
current Date and time in cell Alex01 Excel Discussion (Misc queries) 3 February 24th 06 09:22 PM
how do I insert the current time (static) and date in a cell? DF Excel Discussion (Misc queries) 5 October 28th 05 05:54 PM


All times are GMT +1. The time now is 01:47 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"