How do you highlight a row if criteria has been met?

80 Views Asked by At

Im using Google Sheets and I am trying to highlight a row Green if the numbers 1,2,3 and 4 are found within the outcome row. The whole row would be highlighted indicating whether or not it was successful.

You can view my work here https://docs.google.com/spreadsheets/d/12kOGdkq9P78gCojHJGW0xPVNXaTFAbFDZ4JLEX09H0U/edit?usp=sharing

I have tried conditional formatting but I cant seem to get it to work.

3

There are 3 best solutions below

0
Erik Tyler On BEST ANSWER

I've added another sheet to your spreadsheet (called "Erik Help"), which offers another alternative (which I've applied to B1:L60):

=ArrayFormula(($B1="Outcome")*(RIGHT(JOIN("",SORT(UNIQUE(TRANSPOSE($C1:$L1)),1,1)),4)="1234"))
0
player0 On

try:

=($B1=$B$2)*
 (REGEXMATCH(TRANSPOSE(QUERY(TRANSPOSE($C1:$L),,9^9)), " 1 |1 | 1"))* 
 (REGEXMATCH(TRANSPOSE(QUERY(TRANSPOSE($C1:$L),,9^9)), " 2 |2 | 2"))* 
 (REGEXMATCH(TRANSPOSE(QUERY(TRANSPOSE($C1:$L),,9^9)), " 3 |3 | 3"))* 
 (REGEXMATCH(TRANSPOSE(QUERY(TRANSPOSE($C1:$L),,9^9)), " 4 |4 | 4"))

0

1
Tom Sharpe On

Also just for fun

=arrayformula(($B1="Outcome")*product(countif($C1:$L1,{1,2,3,4})))