Quantcast
Channel: Hot Weekly Questions - Web Applications Stack Exchange
Viewing all articles
Browse latest Browse all 9782

Apply conditional formatting when the value in a row increases or decreases

$
0
0

I am trying to apply conditional formatting to a range of data, but not able to find a solution for it.

I am trying to do two types of formatting.

  1. When a value in a row is less than the value in the previous column, I want the cell highlighted in red. For example, in the image below, cell T2 should be highlighted in red because T2<S2.

    Sample 1

  2. When a value in a row is greater than the value in the previous column, I want the cell to be highlighted in green. For example, in the image below, Q4 should be highlighted in green because Q4>P4.

    Sample 2

The values are only compared to the previous column in the same row, but I want to apply the conditional formatting rule to all the rows in the table.

Link to example spreadsheet with the desired result


Viewing all articles
Browse latest Browse all 9782

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>