Google-sheets – Conditional format based on data in 2 columns

conditional formattinggoogle sheets

I am trying to create a conditional format that will highlight cells across 2 separate columns based on data in both columns:

enter image description here

So I need to highlight all cells in column A that is greater than 0 AND the cells in column b that contain the text green. Both conditions must be met, i.e.

cell b8 contains green, cell a8 contains 0 = no highlight in either
column cell b4 contains green, cell a4 contains 7 = highlight cell a4
and b4

I have worked out how to count the data as shown in cell D5 by using countifs, however if I enter that as a custom formula in conditional formatting it does not highlight the required cells.

Best Answer

try:

=and($A:$A<>0,$B:$B="green")