1
votes

On a Google spreadsheet file, I have two sheets, sheet1 and sheet2. I would like to apply the following conditional formatting to column A of sheet2.

For each row i of sheet2:

  • if Ai < A'i : apply a color red
  • if Ai > A'i : apply a color green
  • if Ai = A'i : apply a color yellow

where:

  • Ai is the cell on column A and row i of sheet2
  • A'i is the cell on column A and row i of sheet1

Is there a way to do this other than manually on each cell of column A of sheet2 ?

Here is the spreadsheet https://docs.google.com/spreadsheets/d/1eqYP9nHxrSVROeTtpcHZkRrm60TJKxJ2hSiah-mPYfk/edit#gid=2116258606 where I used the following non working formula :

=index(indirect("Sheet1!A2"))>A2
=index(indirect("Sheet1!A2"))<A2
=index(indirect("Sheet1!A2"))=A2
1

1 Answers

1
votes

red color:

=A2<INDIRECT("Sheet1!A$2:A")

green color:

=A2>INDIRECT("Sheet1!A$2:A")

yellow color:

=(A2=INDIRECT("Sheet1!A$2:A"))*(A2<>"")

0