2

Is it possible to conditionally format the background colour of a cell, based on the value in the column preceding it?

For example, in the following table (first row/column are titles):

  | A | B | C
1 | 1 | 5 | 2
2 | 2 | 7 | 0
3 | 3 | 1 | 2
4 | 1 | 3 | 4
5 | 1 | 5 | 0
6 | 4 | 1 | 2
7 | 8 | 2 | 4

B1 should be green, as it is greater than A1.

but

C5 should be red, as it is less than B1, etc

I'd like this formatting rule to work with any new column I add. The dataset I'm working with is date driven analytics.

Try as I might, I can either only seem to format the cells by:

  • A fixed number
  • A fixed cell
3

You can conditionally format based on another cell or column by selecting your cells, and making a conditional formatting rule for cells "Greater Than" the cell "A1" as shown below.

Sheets uses this as a relative reference that you're comparing the cell to the left of each cell in your selection.

Screenshot

  • Doh! I was just missing the '='. Thanks @Rob – Jon Hadley Oct 13 '15 at 11:02

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.