# Conditional format that compares 2 cells

Hello there!
So I have this table that i use as a follow up of animal´s weights and I was wondering if I can make a formula that checks 2 the last weights of a certain animals and in case it lost more than 1kg since the last check, then the cell(or row) will be colored in red.
Basically its comparing last row of animal 1 to the penultimate row of animal 1. If -1Kg cell will be colored red. Here is an example table

Hi @Asaf_Chip,

Best regards
Jannis

Hey there Jannis!
Amm actually I don´t see any changes.
Could you tell me what did you do?

Also i added a new row “katy” that is now a 7 instead of 9.7 so for that example the row with the 7 should come up marked as red

Hi @Asaf_Chip,

I duplicated the original page.
Open the side bar and take a look at the newly created page.

Best regards
Jannis

YES!! that’s is not only what I hoped to achieve but way better!!!

@Jannis I did notice though that when I added a new row, instead of checking what will be now the last weight, the formula went to what will be now 2 weights ago.
So for example (I kept it in the table) :
Pipa was at first was first 12.3kg
On the second check 8kg so 8-12.3 = -4.3 and so for that example, Formula works perfect!
but on the third check I added 15kg but instead of doing 15-8(for the last check that is now) it jumps again to 12.3 so it does 15-12.3.
So for some reason it maintained the weight of 12.3kg as default instead of updating it.
I tried to see if i can find the problem but it above my level of knowledge in Coda (for now)

**On the other hand, seeing you solution made me also add the opposite idea. So if the weight is going above 1kg, then it will be marked with a different color and thanks to your system it was pretty easy to make so

Anyway THANK YOU so much Jannis!

1 Like

Hi @Asaf_Chip,