Google-sheets – Conditional formatting based on another cell

conditional formattinggoogle sheets

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?

Best Answer

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

=AND(ISBLANK(B4),ISBLANK(B5))

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.