Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 465
Default Using time functions to give a warning


Hi

In cell I14 I need to put a formula which says 'Open' when the PC clock
is between 8 am and 4.30 pm , and 'Closed' when the PC clock is later
than 4.30 pm.

Can someone help with the code , please?

thanks.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,766
Default Using time functions to give a warning

Hi,

Try this

=if(and(time(8,0,0)<=now(),time(16,30,0)=now())," Open","Closed").

This will not auto update. You will have to press F9 to update

--
Regards,

Ashish Mathur
Microsoft Excel MVP
www.ashishmathur.com

"Colin Hayes" wrote in message
...

Hi

In cell I14 I need to put a formula which says 'Open' when the PC clock is
between 8 am and 4.30 pm , and 'Closed' when the PC clock is later than
4.30 pm.

Can someone help with the code , please?

thanks.


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 694
Default Using time functions to give a warning

Hi Colin
Not sure if that's what you want but try it.
=IF(AND(NOW()TIME(8,0,0),NOW()<TIME(16,30,0)),"Op en","Close")
Make sure your cells are formatted as time.
Regards
John
"Colin Hayes" wrote in message
...

Hi

In cell I14 I need to put a formula which says 'Open' when the PC clock is
between 8 am and 4.30 pm , and 'Closed' when the PC clock is later than 4.30
pm.

Can someone help with the code , please?

thanks.


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default Using time functions to give a warning

Try this:

=IF(AND(mod(NOW(),1)=TIME(8,0,0),MOD(NOW(),1)<=TI ME
(16,30,0)),"Open","Closed")

Hope this helps.

Pete

On Jan 11, 10:29*pm, Colin Hayes wrote:
Hi

In cell I14 I need to put a formula which says 'Open' when the PC clock
is between 8 am and 4.30 pm , and 'Closed' when the PC clock is later
than 4.30 pm.

Can someone help with the code , please?

thanks.


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 465
Default Using time functions to give a warning


Hi All

OK thanks for your help and expertise on this.

I'm using this formula to say 'Open' between 8 am and 4.30 pm , and
'Closed' after this.

=IF(AND(MOD(NOW(),1)=TIME(8,0,0),MOD(NOW(),1)<=TI ME(16,30,0)),"Open","Closed")


It works fine. As a refinement , is it possible to modify the formula to
only pertain to weekdays , and say 'Closed' at weekends?

Grateful for any advice.



Best Wishes




In article
,
Pete_UK writes
Try this:

=IF(AND(mod(NOW(),1)=TIME(8,0,0),MOD(NOW(),1)<=T IME
(16,30,0)),"Open","Closed")

Hope this helps.

Pete

On Jan 11, 10:29*pm, Colin Hayes wrote:
Hi

In cell I14 I need to put a formula which says 'Open' when the PC clock
is between 8 am and 4.30 pm , and 'Closed' when the PC clock is later
than 4.30 pm.

Can someone help with the code , please?

thanks.






  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default Using time functions to give a warning

Try this variation, Colin:

=IF(WEEKDAY(NOW(),2)5,"Closed",IF(AND(MOD(NOW(),1 )=TIME(8,0,0),MOD
(NOW(),1)<=TIME(16,30,0)),"Open","Clos*ed"))

Hope this helps.

Pete

On Jan 14, 1:39*am, Colin Hayes wrote:
Hi All

OK thanks for your help and expertise on this.

I'm using this formula to say 'Open' between 8 am and 4.30 pm , and
'Closed' after this.

=IF(AND(MOD(NOW(),1)=TIME(8,0,0),MOD(NOW(),1)<=TI ME(16,30,0)),"Open","Clos*ed")

It works fine. As a refinement , is it possible to modify the formula to
only pertain to weekdays , and say 'Closed' at weekends?

Grateful for any advice.

Best Wishes

In article
,
Pete_UK writes



Try this:


=IF(AND(mod(NOW(),1)=TIME(8,0,0),MOD(NOW(),1)<=T IME
(16,30,0)),"Open","Closed")


Hope this helps.


Pete


On Jan 11, 10:29 pm, Colin Hayes wrote:
Hi


In cell I14 I need to put a formula which says 'Open' when the PC clock
is between 8 am and 4.30 pm , and 'Closed' when the PC clock is later
than 4.30 pm.


Can someone help with the code , please?


thanks.- Hide quoted text -


- Show quoted text -


  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 465
Default Using time functions to give a warning

In article
,
Pete_UK writes
Try this variation, Colin:

=IF(WEEKDAY(NOW(),2)5,"Closed",IF(AND(MOD(NOW(), 1)=TIME(8,0,0),MOD
(NOW(),1)<=TIME(16,30,0)),"Open","Clos*ed"))

Hope this helps.

Pete



HI Pete

OK Thanks for that - it's working brilliantly.



Best Wishes





On Jan 14, 1:39*am, Colin Hayes wrote:
Hi All

OK thanks for your help and expertise on this.

I'm using this formula to say 'Open' between 8 am and 4.30 pm , and
'Closed' after this.

=IF(AND(MOD(NOW(),1)=TIME(8,0,0),MOD(NOW(),1)<=TI ME(16,30,0)),"Open"

,"Clos*ed")

It works fine. As a refinement , is it possible to modify the formula to
only pertain to weekdays , and say 'Closed' at weekends?

Grateful for any advice.

Best Wishes

In article
,
Pete_UK writes



Try this:


=IF(AND(mod(NOW(),1)=TIME(8,0,0),MOD(NOW(),1)<=T IME
(16,30,0)),"Open","Closed")


Hope this helps.


Pete


On Jan 11, 10:29 pm, Colin Hayes wrote:
Hi


In cell I14 I need to put a formula which says 'Open' when the PC clock
is between 8 am and 4.30 pm , and 'Closed' when the PC clock is later
than 4.30 pm.


Can someone help with the code , please?


thanks.- Hide quoted text -


- Show quoted text -



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
can anyone give me all the functions in the excel worksheet with Neelakanta Excel Worksheet Functions 1 May 28th 08 11:35 AM
Reset should give a warning before resetting custom colors. ryders Setting up and Configuration of Excel 0 June 18th 06 01:10 AM
have a cell give warning billy boy Excel Discussion (Misc queries) 11 December 15th 05 07:43 PM
Warning! Time has expired.... yh73090 Excel Worksheet Functions 0 November 9th 05 10:18 PM
How do I give permission for certain functions in excel in locked. tradinoncoffee Excel Worksheet Functions 1 January 2nd 05 06:52 PM


All times are GMT +1. The time now is 07:23 AM.

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

About Us

"It's about Microsoft Excel"