Forum Discussion
conditional format cell based on current hour
- myrteJun 14, 2023Copper Contributor
- SergeiBaklanJun 15, 2023Diamond Contributor
Please check attached file if it works in your environment.
Formula in column J to test the logic
=($E3 < MOD(NOW(), 1) ) * ($H3 > MOD(NOW(), 1) ) + ($E3 > MOD(NOW(), 1) ) * ($H2 < MOD(NOW(), 1) )Conditional formatting with that formula
- SergeiBaklanJun 15, 2023Diamond Contributor
myrte , in addition, perhaps for second half of an hour same row shall be highlighted and I used CF wrongly. But form formula point of view that will be exactly the same, only adjust references a bit.
 
 
 - mtarlerJun 14, 2023Silver Contributor
I was going to say the same formula as Sergei but I will add that maybe the formula you have might be from a variation where those cells with times listed are not recognized as time VALUES but as text instead and therefore TIMEVALUE was being used to convert the text "10:00" to a time VALUE, because the way you have the formula written right now doesn't make sense and does NOT work on the spreadsheet either.
- myrteJun 14, 2023Copper ContributorI didn't realize that thank you! In excel the number format was on custom, seems like it kinda recognised that it was time notation, but it also didn't? To make sure, I put it on time now.
- mtarlerJun 15, 2023Silver Contributor
myrte if sergei's formula didn't work then maybe those "time" cells are actually text (like I mentioned above). Try this version:
=( TIMEVALUE($E6) < MOD(NOW(),1) )* ( TIMEVALUE($H6) > MOD(NOW(),1) )NOW() is always going to be a value since it is coming from excel