Conditional Formatting

34 views
Skip to first unread message

Kinnie Laughlin

unread,
Dec 1, 2022, 4:08:35 PM12/1/22
to Google Sheets Community
Hello people!
I've been trying to figure this out on my own and am failing spectacularly.
I have a table in google sheets with column headers such as date 1 (column includes dates) and results1 (results are entered in a cell as either "-", "Positive", or a value such as 21.5), then date 2 and results 2 etc. until results 6 or 7.
What I want to do is highlight the entire row if one of the cells in any of the results columns has a number between 15 and 27.99. 
So for example, my first results row is column E, so I tried in the custom formula for conditional formatting:
 =isbetween($E:$E,15,27.99) and several other options including multiple columns (not just E), and the results are either nothing highlights, or the wrong rows are highlighted (for no reason that I can determine). I don't know if the issue is that these columns sometimes contain text instead of numbers, or if I am just totally on the wrong track. 
I was able to get it to work to highlight rows if the cell = "Positive" but subbing numbers into that same formula didn't work. Successful formula for that one is =or($E:$E="Positive",$G:$G="Positive",$I:$I="Positive")

Thanks, you're the best!

Alexander Ivanov

unread,
Dec 26, 2022, 2:46:02 AM12/26/22
to Google Sheets Community
Hello!

As I can see at first you have to define a named function like this

=OR(
  AND(INDEX(args1,0,2)>=15,INDEX(args1,0,2)<30),
  AND(INDEX(args1,0,4)>=15,INDEX(args1,0,4)<30),
  AND(INDEX(args1,0,6)>=15,INDEX(args1,0,6)<30),
  AND(INDEX(args1,0,8)>=15,INDEX(args1,0,8)<30),
  AND(INDEX(args1,0,10)>=15,INDEX(args1,0,10)<30),
  AND(INDEX(args1,0,12)>=15,INDEX(args1,0,12)<30),
  AND(INDEX(args1,0,14)>=15,INDEX(args1,0,14)<30),
)

Yep, it's not clear =)

For the next you need check all your rows like this

=BYROW(A2:O11,LAMBDA(row, CHECK(row)))

After all create a conditional formatting rule

1672040590109.png


Cheers!
Reply all
Reply to author
Forward
0 new messages