I use Google Sheets to schedule office appointments.

I have set conditional formatting so that if the appointment time slot cells are empty, they are highlighted yellow. (This makes it easier to find the next free appointment). When those cells contain text, they are returned to white.

However, there some days where a client has a choice between either a morning appointment or an afternoon appointment. If they choose morning, we cancel the afternoon session. If they choose afternoon, we do not have a morning session.

How do I set it up so that if B4 and B5 are empty, they are highlighted yellow, however, if B4 contains ANY text, then B5 is back to white?

  • Hmm. Not sure about this, but have you considered merging these two cells so that whatever happens to b4, b5 will get affected?
    – Aurora A
    Apr 20, 2015 at 14:33

2 Answers 2


In Conditional Formatting, select Custom Formula is and use the formula:


Then when both B4 and B5 are empty, they will both be coloured; when either one has text in it, they will both be white.


To apply a single rule, once, I suggest clearing any formatting from B4:B5, selecting the pair and applying a Custom formula is of:


with formatting of choice and Done.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.