Google-sheets – Conditional Formatting with Multiple Conditions Weekday and Time

conditional formattinggoogle sheets

I'm working with Google Sheets and want to highlight cells in long date format (e.g. 11/13/2018 21:00:00) that are Tuesday and 21:00:00. Here is my attempt:

=AND((weekday(C4:C124)=3),(EQ(RIGHT(C4:C124,8)),"21:00:00"))

What I understand this to say is "if the weekday is Tuesday AND the eight characters at the end of the cell is equal to 21:00:00, then highlight."

What might I be missing in getting this to work properly?

Best Answer

Please try this one instead:
=AND((weekday(C$4:C24)=3),(EQ(RIGHT(C$4:C24,8),"21:00:00")))

Do take notice of both the $ signs. The formula will not work if you omit them.

PS: When asking try giving the URL to a sample sheet and if the answer works accept it so as to help others as well. (Why vote?)