Home |
Search |
Today's Posts |
|
#1
![]() |
|||
|
|||
![]()
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
![]() |
|||
|
|||
![]()
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
![]() |
|||
|
|||
![]()
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
![]() |
|||
|
|||
![]()
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 |
#5
![]() |
|||
|
|||
![]()
The reason Matt's formula fails is because NOW() at the moment is 38545
point something or other which of course is bigger than any time which will be less than one. To make your formula work try using MOD(NOW(),1)*24 in place of HOUR -- HTH Sandy Replace@mailinator with @tiscali.co.uk "ynissel" wrote in message ... 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
![]() |
|||
|
|||
![]()
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
![]() |
|||
|
|||
![]()
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
![]() |
|||
|
|||
![]()
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
![]() |
|||
|
|||
![]()
=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
![]() |
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Adding time | Excel Discussion (Misc queries) | |||
time differences in a column | Excel Worksheet Functions | |||
Time Sheet Calculation Help Needed! | Excel Worksheet Functions | |||
Time Sheets | Excel Discussion (Misc queries) | |||
unmet challenge | Excel Worksheet Functions |