In Google Sheets, how do you conditionally color cells based on whether the cell's value is accelerating or decelerating?

For example, in the image below, I created four columns: the time, distance, speed, and acceleration. The acceleration is just the second derivative of the distance. How would I conditionally color the background of the distance column based on the acceleration column in Google sheets? I would not like to create separate columns for speed and acceleration, instead, just relying on the distance column itself.

distance, speed, acceleartion


Use the Format > Conditional Formatting tool.

First, select a cell in the distance column. We want this to be red or green based on the corresponding acceleration value in the same row.

You want to use a custom formula (bottom option) and then make it read =Dx>0 See the recreation I have done. You will need to do this for each value in distance.


| improve this answer | |
  • A few things: (1) Is there any way to do this without first creating the acceleration column? (2) Also, any way to turn it into a gradient rather than a single color? (3) Finally, it looks like you need to have a different formula for each cell, any way you can setup something automatic? – speedplane Nov 23 '16 at 1:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.