#1   Report Post  
ynissel
 
Posts: n/a
Default Time

How do I write an if statement to check if its past 5:30 PM. I tried
if(hour17.5) but that only checks the hr itself and not minutes.
Thanks,
Yosef
  #2   Report Post  
Matt Lunn
 
Posts: n/a
Default

Hi,

Try this

=IF(NOW()TIME(17,30,0),TRUE,FALSE)

This checks against your current defined system time. It will not keep
checking by itself. To update you can press the F9 key.

Hope this helps,

Matt


"ynissel" wrote:

How do I write an if statement to check if its past 5:30 PM. I tried
if(hour17.5) but that only checks the hr itself and not minutes.
Thanks,
Yosef

  #3   Report Post  
ynissel
 
Posts: n/a
Default

Ill try thanks - I just figured out another way. yours is much cleaner.
=IF(HOUR(NOW())=17,IF(MINUTE(NOW())=30,"The lock desk closed at 5:30 PM,
please lock tomorrow !!",""),"")

"Matt Lunn" wrote:

Hi,

Try this

=IF(NOW()TIME(17,30,0),TRUE,FALSE)

This checks against your current defined system time. It will not keep
checking by itself. To update you can press the F9 key.

Hope this helps,

Matt


"ynissel" wrote:

How do I write an if statement to check if its past 5:30 PM. I tried
if(hour17.5) but that only checks the hr itself and not minutes.
Thanks,
Yosef

  #4   Report Post  
ynissel
 
Posts: n/a
Default

OK - mine didnt work. but Im having an issue with yours as well
I typed in =IF(NOW()TIME(17,29,0),TRUE,FALSE) but its saying true and its
only 4:26 PM ??
Am I missing something ?
Thanks

"Matt Lunn" wrote:

Hi,

Try this

=IF(NOW()TIME(17,30,0),TRUE,FALSE)

This checks against your current defined system time. It will not keep
checking by itself. To update you can press the F9 key.

Hope this helps,

Matt


"ynissel" wrote:

How do I write an if statement to check if its past 5:30 PM. I tried
if(hour17.5) but that only checks the hr itself and not minutes.
Thanks,
Yosef

  #6   Report Post  
Matt Lunn
 
Posts: n/a
Default

Hi,

You could also use this if the time you wish to check against is in cell A1

=IF(A1TIME(17,30,0),TRUE,FALSE)

ThaNKS


"ynissel" wrote:

How do I write an if statement to check if its past 5:30 PM. I tried
if(hour17.5) but that only checks the hr itself and not minutes.
Thanks,
Yosef

  #7   Report Post  
ynissel
 
Posts: n/a
Default

aaahhhhhhhhh
Sorry but Im frustrated - why isnt it working !!!

"Matt Lunn" wrote:

Hi,

You could also use this if the time you wish to check against is in cell A1

=IF(A1TIME(17,30,0),TRUE,FALSE)

ThaNKS


"ynissel" wrote:

How do I write an if statement to check if its past 5:30 PM. I tried
if(hour17.5) but that only checks the hr itself and not minutes.
Thanks,
Yosef

  #8   Report Post  
ynissel
 
Posts: n/a
Default

worked like a charm ! Quite smart - looking at the remainder. damn why
cant they make some of these functions a bit easier !!

thanks !
Yosef


"ynissel" wrote:

How do I write an if statement to check if its past 5:30 PM. I tried
if(hour17.5) but that only checks the hr itself and not minutes.
Thanks,
Yosef

  #9   Report Post  
CLR
 
Posts: n/a
Default

=IF(((NOW()-INT(NOW()))0.729167),"After 5:30","Not 5:30 yet")

Vaya con Dios,
Chuck, CABGx3


"ynissel" wrote in message
...
How do I write an if statement to check if its past 5:30 PM. I tried
if(hour17.5) but that only checks the hr itself and not minutes.
Thanks,
Yosef



  #10   Report Post  
Matt Lunn
 
Posts: n/a
Default

Apologies for earlier posting being wrong, meant it to be:

=IF(TIME(HOUR(NOW()),MINUTE(NOW()),SECOND(NOW())) TIME(17,30,0),TRUE,FALSE)

Cheers,
Matt

"CLR" wrote:

=IF(((NOW()-INT(NOW()))0.729167),"After 5:30","Not 5:30 yet")

Vaya con Dios,
Chuck, CABGx3


"ynissel" wrote in message
...
How do I write an if statement to check if its past 5:30 PM. I tried
if(hour17.5) but that only checks the hr itself and not minutes.
Thanks,
Yosef






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
Adding time damezumari Excel Discussion (Misc queries) 2 June 20th 05 08:35 PM
time differences in a column 68magnolia71 Excel Worksheet Functions 3 May 9th 05 09:46 PM
Time Sheet Calculation Help Needed! sax30 Excel Worksheet Functions 2 April 26th 05 08:08 PM
Time Sheets Lady Layla Excel Discussion (Misc queries) 1 March 23rd 05 03:22 PM
unmet challenge boris Excel Worksheet Functions 2 March 16th 05 02:13 PM


All times are GMT +1. The time now is 08:17 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"