Reputation: 23
I am trying to create a worksheet which colour codes the cells according to the next date. If the value of 1 July is higher than the value of 30 June then the cell of 1 July needs to be green but if its lower then it needs to be red. This would then apply to all dates in my worksheet according to the previous days value.
I am unsure how to apply conditional formatting to an entire column based on the previous rows cell value and not one single cell value
Upvotes: 0
Views: 2120
Reputation: 647
The conditional formatting will be applied when the criteria result = TRUE. Here is the formula to enter into the conditional format window to result in a RED cell. Green would be the same, but with a greater than symbol. Click on the first cell that should be conditionally formatted, then create the conditional format rule and check it. Then copy the cell, highlight the range of cells to be formatted and paste-formatting only.
Note, in your explanation you mention that a lower value than the prior day should be RED, but the image shows GREEN. You can reverse the formula below based on the output that you need.
=AND(ISNUMBER(B2),ISNUMBER(B3),B3<B2)
Upvotes: 1