A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Cell value determined by the current time and date



 
 
Thread Tools Display Modes
  #1  
Old June 12th, 2009, 09:31 AM posted to microsoft.public.excel.worksheet.functions
jschae
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  
Old June 12th, 2009, 09:49 AM posted to microsoft.public.excel.worksheet.functions
Jacob Skaria
external usenet poster
 
Posts: 5,952
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  
Old June 12th, 2009, 09:56 AM posted to microsoft.public.excel.worksheet.functions
Mike H
external usenet poster
 
Posts: 8,419
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  
Old June 12th, 2009, 10:55 AM posted to microsoft.public.excel.worksheet.functions
David Biddulph
external usenet poster
 
Posts: 8,714
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  
Old June 12th, 2009, 01:45 PM posted to microsoft.public.excel.worksheet.functions
Jacob Skaria
external usenet poster
 
Posts: 5,952
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?




 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 12:56 PM.


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