Home > Mobile >  Google Sheets - Conditional Formatting: Multiple conditions for coloring an entire row
Google Sheets - Conditional Formatting: Multiple conditions for coloring an entire row

Time:08-27

I'm struggling with conditional formatting.

Here is my data:

initial data

I already applied a formula that changes the background color of the entire row if the value of the cell in the column C is not empty:

=$C2<>""

with the following result:

data after first formula applied

What I'd like to do now is that:

If cell C2 is not empty and D2 (checkbox) is true, then highlight the entire row in green.

Since highlighting and entire row based on the TRUE value of a checkbox is:

=$D2

I tried something like:

=AND($C2<>"",$D2)

I tried also several variations but none of them seems working, cause everythime, with the AND function I get the Invalid formula error, but I don't understand why.

invalid formula

Can someone plese help me?

Thanks in advance!

CodePudding user response:

Use the Asterisk Symbol (*) for AND Logic

I have made a sample data similar to yours:

enter image description here

In the conditional format rules, I used the following custom formula:

=($C2<>"") * ($D2)

The (*) sign serves as an AND logic operand in this case. So the conditional format rules should look like this:

enter image description here

Output

The output should look like this:

enter image description here

Wherein the rows would only be highlighted when both Data and Done columns are not empty and true, respectively.

CodePudding user response:

looks like your sheet is not english so use semicolon instead of comma:

=AND($C2<>""; $D2)

or as suggested use boolean logic:

=($C2<>"")*($D2=TRUE)
  • Related