Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Apply conditional formatting to compare multiple rows and columns to a reference column

I have a Google sheet of this form:

   A   B   C   D   E
1 A1 B1 C1 D1 E1
2 A2 B2 C2 D2 E2
3 A3 B3 C3 D3 E3
4 A4 B4 C4 D4 E4
5 A5 B5 C5 D5 E5

The column $A contains reference values to which I want to compare the rest of the table. The formatting I want to do is simple:

For each row x of the table:

  For each column β in columns (B:Z) of the table:

  • apply color green: if the cell βx is greater than $Ax
  • apply color red: if the cell βx is less or equal to $Ax

I have tried a custom formula with =$A1:$A>B1:Z on range B1:Z, but it doesn't work.

This formula works on only one column (for example B): =$A1:$A>B1:B on range B1:B. I'm just now looking for a way to apply this formatting to all columns at once, without having to rebuild the conditional format manually for each column (hundreds of columns is a lot..)

like image 596
user2779653 Avatar asked Jul 03 '14 22:07

user2779653


1 Answers

Please try:

SO24564331 example

with the Range:'s adjusted to suit. (If that is not what you require it should be fairly easy to fix.)

like image 175
pnuts Avatar answered Oct 11 '22 14:10

pnuts