Comparing Time in a Formula

J

Josh Doten

I am trying to do some conditional formatting which requires me to compare
two "time" values".

Basically what I'm doing is changing the text color if the value of a cell,
which is formatted as a time of day, if that time is greater than 9:00 PM.

In the conditional format I tried "Use a Formula to determine which cells to
Format" with the formula "=$B3>9:00 PM" and several varients of the same
general idea. 90% of them returned errors, the other 10% made everything
true... even if it wasn't. The idea is that if B3's value were after 9:00 PM
the text would turn red.

Any idea what I'm doing wrong?
 
L

Luke M

With that quote placement, you made the logic check a giant text string.
Try:
=$B3>TIME(21,0,0)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top