Conditional format: different color depending on the value of the previous row

I am trying to put a color in each cell depending on the percentage of variation with the data of the previous cell:
c1

In the Conditional format options it only allows you to enter a color based on the cell’s value:
c2

Is it possible to compare the current cell value with the previous one to use a different color in the cell?

Hello @David_R ,
Yes, this can be done. A lof has been written about this type functionality, including by myself. There are a couple of things you need to be aware of, but for a lot of tables it is workable.

I have made a (documented) example to show how it is done. For good measure I have added column shading. Make sure you copy the document and check the column formulas to see how it is done.

Succes,
Greetings,
Joost

https://coda.io/@skygliders/samples-for-the-community/retrieve-values-from-previous-row-16

2 Likes

hi @David_R ,

inside Coda a previousRow function is not yet available, though the Coda team knows this is one of the missing elements if it wants to replace spreadsheet logic even more.

I wrote an article about with some tricks to apply such a previousRow logic. You find it here:

I hope it helps, Christiaan

2 Likes