Rohr Facu
Rohr Facu

Reputation: 737

Google sheets - Relative conditional format based on cell above

I search in the deepest parts on the internet for a google sheets relative conditional formating based on the cell above value, which means, that whenever i add a new value in the cell below, it will automatically check the cell above value and format the cell according to it.

I've finally came to the solution explained below.

The result will be something like this:

enter image description here

I hope it works for you, weary traveller.

Upvotes: 3

Views: 5478

Answers (2)

MattKing
MattKing

Reputation: 7783

If the range of cells is A2:G, this rule will also work:

=AND(A2<>"",A2<A1)    [RED]

=AND(A2<>"",A2>A1)    [GREEN]

Upvotes: 6

Rohr Facu
Rohr Facu

Reputation: 737

  • Select the range of cells that you want to format.
  • Go to >Format > Conditional Format > Add rule.
  • Under format rules select the option "Custom Formula is".
  • Paste the next formula if you want to check that your current cell is BIGGER THAN the cell above: =INDIRECT(ADDRESS(ROW();COLUMN())) > INDIRECT(ADDRESS(ROW()-1;COLUMN()))
  • OR the next formula if you want to check that your current cell is LOWER THAN the cell above: =INDIRECT(ADDRESS(ROW();COLUMN())) < INDIRECT(ADDRESS(ROW()-1;COLUMN())).
  • Select the color you like to apply, and click in DONE.

Upvotes: 15

Related Questions