Karen
Karen

Reputation: 11

Format/Highlight multiple cells based on value selected in one cell in google sheet

I have a Google Sheet set up as a calendar where users select a type of communication in each cell from a custom drop-down menu (from data validation). When they select a type, it colours the cell and the adjacent cell in a colour I have set. They then populate the adjacent cell with notes relating to that communication.

I want to have a master drop-down at the top so when I select a communication type it highlights/colours that type of cell and the notes cells wherever they appear in the calendar or so that it hides all other cells and shows only one type.

I have tried adding conditional formatting to all cells that do not start with the selected type (i.e. white font, white background) but this means the adjacent notes cell also gets hidden.

Does anyone know anything else I could try?

Image attached shows the conditional formatting I have set up and how I would like the "SHOW ONLY" to work at the top:

enter image description here

Upvotes: 1

Views: 682

Answers (1)

Max Makhrov
Max Makhrov

Reputation: 18707

You need to make master drop-down list for A2 with this values:

Show All
a
b
c
d

And then make 2 additional rules for conditional formatting.

Use custom formula for the first rule:

=A4=$A$2

Format background to any colour.

Use custom formula for the second rule:

=and(A4<>$A$2;$A$2<>"Show All")

Format the second rule with no background colour.

Place this rules to the top of list:

enter image description here

That's all, now you may use master cell with dropdown:

enter image description here

Upvotes: 1

Related Questions