Forum Discussion
Wdstk61
Apr 09, 2023Copper Contributor
Logic Function
Can I use the logic function with time, if time > 11:59 then ...? If so, how?
- Apr 09, 2023
If you mean the logical function IF() and the comparison operator > then this could be:
=IF(A3>TIME(11,59,0),100,-100)A3 contains a time value.
Detlef_Lewin
Apr 09, 2023Silver Contributor
If you mean the logical function IF() and the comparison operator > then this could be:
=IF(A3>TIME(11,59,0),100,-100)A3 contains a time value.
Wdstk61
Apr 15, 2023Copper Contributor
I'm still having a problem. I want to check the time in a cell to see if it is morning or evening (assign 0 before 12:00 noon or assign 1 12:00 noon or after). I tried =IF(A3<"12:00",0 ,1), but I get 1 regardless of the time in A3, or if I replace < with > I get 0 regardless of the time. A3 is formatted as hour:minute AM/PM.
- Detlef_LewinApr 15, 2023Silver Contributor
- Wdstk61Apr 16, 2023Copper ContributorI looked at your formula again. I was not familiar with the TIME function. But I finally did figure it out, and now it does work. Thank you again.